diff --git a/man3/gethostid.3 b/man3/gethostid.3 index 3881cacdb..abd0d6004 100644 --- a/man3/gethostid.3 +++ b/man3/gethostid.3 @@ -60,11 +60,6 @@ and thus usually never needs to be set. The .BR sethostid () call is restricted to the superuser. - -The -.I hostid -argument is stored in the file -.IR /etc/hostid . .SH "RETURN VALUE" .BR gethostid () returns the 32-bit identifier for the current host as set by @@ -86,8 +81,6 @@ to store the host ID. .B EPERM The calling process's effective user or group ID is not the same as its corresponding real ID. -.SH FILES -.I /etc/hostid .SH "CONFORMING TO" 4.2BSD; these functions were dropped in 4.4BSD. SVr4 includes @@ -99,10 +92,18 @@ POSIX.1-2001 specifies but not .BR sethostid (). .SH NOTES +In the glibc implementation, the +.I hostid +is stored in the file +.IR /etc/hostid . +(In glibc versions before 2.2, the file +.I /var/adm/hostid +was used.) +.\" libc5 used /etc/hostid; libc4 didn't have these functions + In the glibc implementation, if .BR gethostid () -cannot open -.IR /etc/hostid , +cannot open the file containing the host ID, then it obtains the hostname using .BR gethostname (2), passes that hostname to