HP-UX Reference (11i v2 07/12) - 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] 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 functions that pro-
vide equivalent functionality.
Some vendors’ versions of
getutent() erase the utmp file if the file exists but is not an integral multiple
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 indication.
For portability,
getutx functions are preferred over these functions.
FILES
/etc/utmp
/etc/utmpx
/var/adm/wtmp
SEE ALSO
utmpd(1M), getutx(3C), getuts(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
556 Hewlett-Packard Company − 3 − HP-UX 11i Version 2: December 2007 Update