HP-UX Reference (11i v3 07/02) - 3 Library Functions A-M (vol 6)
g
getut(3C) getut(3C)
(TO BE OBSOLETED)
Reentrant Interfaces
Upon successful completion, getutent_r() , getutid_r() , getutline_r()
and
pututline_r()
return 0. Otherwise, they all return -1 and set errno
.
ERRORS
Reentrant Interfaces
[EINVAL] The utmp or ud parameter is equal to NULL.
WARNINGS
getutent_r() , getutid_r() , getutline_r()
, pututline_r()
, setutent_r() ,
endutent_r() , and utmpname_r() are obsolescent interfaces supported only for compatibility with
existing DCE applications. New multithreaded applications should use use the getutx(3C) functions that
provide equivalent functionality.
Some vendors’ versions of
getutent() erase the utmp file if the file exists but is not an integral multi-
ple of
sizeof(struct utmp)
. Given the possibility of user error in providing a name to utmpname
(such as giving improper arguments to who(1)), HP-UX does not do this, but instead returns an error indi-
cation.
For portability, getutx(3C) functions are preferred over these functions.
FILES
/etc/utmp
/etc/utmpx
/var/adm/wtmp
SEE ALSO
utmpd(1M), getuts(3C), getutx(3C), pututxline(3C), ttyslot(3C), utmp(4), thread_safety(5).
STANDARDS CONFORMANCE
endutent() : SVID2, SVID3, XPG2
getutent() : SVID2, SVID3, XPG2
getutid(): SVID2, SVID3, XPG2
getutline() : SVID2, SVID3, XPG2
pututline() : SVID2, SVID3, XPG2
setutent() : SVID2, SVID3, XPG2
utmpname() : SVID2, SVID3, XPG2
HP-UX 11i Version 3: February 2007 − 3 − Hewlett-Packard Company 581