Lakshmi wrote:
> All, Not sure if this is the right group to post this question, but any help
> is highly appreciated , we are having an issue of utmpx getting corrupted and
> loosing "boot time" information, uptime will not return system up time.
>
> After lot of investigation , we figured out that apart from system binaries
> which are updating utmpx file at the time of corruption , there is a program
> (customized to our environment ) is running which is supposed to be reading
> only from utmpx file , we verified the source code and the C library this
> program is using is "getutxent()" but this file is opening utmpx as
> Read,write and create mode? is this normal? we suspect that while the file is
> open in this mode how are writes to utmpx file by other binaries handled? we
> are not sure but are trying to figure out how exactly this file is getting
> corrupted..
>
> open("/var/adm/utmpx", O_RDWR|O_CREAT, 0644) = 8
> open("/var/adm/utmpx", O_RDWR) = 9
Here's the functino from libc:
http://src.opensolaris.org/source/xref/onnv/onnv-gate/usr/src/lib/libc/port/gen/getutx.c#getutxent_frec
so, yes, it's intentional, for better or worse.
_______________________________________________
opensolaris-code mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opensolaris-code