GETHOSTNAME(2) — HP-UX
NAME
gethostname − get name of current host
SYNOPSIS
char hostname[];
gethostname(hostname, sizeof (hostname));
DESCRIPTION
Gethostname returns the standard host name for the current processor, as set by sethostname(2). The name is truncated to sizeof(hostname)-1 and is null-terminated.
ERRORS
Gethostname can fail if:
[EFAULT] Hostname points to an illegal address. The reliable detection of this error will be implementation dependent.
AUTHOR
Gethostname was developed by the University of California, Berkeley California, Computer Science Division, Department of Electrical Engineering and Computer Science.
SEE ALSO
hostname(1), uname(1), sethostname(2), uname(2).
Hewlett-Packard Company — Version B.1, May 11, 2021