COHERENT manpages
This page displays the COHERENT manpage for pututline() [Write a record into a logging file].
List of available manpages
Index
pututline() -- General Function (libc) Write a record into a logging file #include <utmp.h> struct utmp *pututline(record) const struct utmp *record; Function pututline() writes record into the file that logs login events. It is designed to update a record within the logging file. record points to the record to be insert into the logging file. It is of type utmp, which is a structure whose fields describe a login event. (For a detailed description of this structure, see the Lexicon entry for utmp.h.) pututline() assumes that you have first called getutent(), getutid(), or getutline() to open the logging file, and that the file's seek pointer is is at or before the record you wish to update. pututline() looks for the first record within the logging file whose field ut_line matches record.ut_line. If it finds such a record, pututline() overwrites it with the contents of record; otherwise, it appends record onto the end of the logging file. If all goes well, pututline() returns the address record. It returns NULL if the logging file had not been opened, or if it could not write record into the logging file. By default, getutid() updates record in the logging file /etc/utmp. If you wish to manipulate another file, use the function utmpname(). See Also libc, utmp.h