COHERENT manpages
This page displays the COHERENT manpage for getutent() [Read an entry from a login logging file].
List of available manpages
Index
getutent() -- General Function (libc) Read an entry from a login logging file #include <utmp.h> struct utmp *getutent() getutent() reads the next entry from the file that holds login information. If the file is not open, getutent() opens it. By default, getutent() reads file /etc/utmp. To change this, call utmpname(). getutent() returns the address of the record it has read from the login file. This object has type utmp, which is defined in header file <utmp.h>; for a detailed description of this structure, see the Lexicon entry for utmp.h. getutent() returns NULL if it cannot open the login file, or when it attempts to read past the end of the file. See Also libc, utmp.h Notes getutent() writes its utmp record into a static portion of memory, which it overwrites the next time it is called. Therefore, if you wish to save utmp record, you must copy it into a portion of memory that you define before you again call getutent().