SETHOSTNAME(2)
NAME
sethostname − set name of host cpu
SYNOPSIS
sethostname(name, namelen)
char *name;
int namelen;
DESCRIPTION
This call sets the name of the host processor to name, which has a length of namelen characters. This is normally executed by /etc/rc when the system is bootstrapped. Host names are limited to MAXHOSTNAMELEN characters; MAXHOSTNAMELEN is defined in <sys/param.h>.
ERRORS
Sethostname fails and returns an error if:
[EPERM] It is not executed by the superuser.
[EFAULT] Name points to an illegal address. The reliable detection of this error is implementation dependent.
AUTHOR
Sethostname was developed by the University of California, Berkeley.
SEE ALSO
hostname(1), uname(1), gethostname(2), uname(2).
Hewlett-Packard Company — HP-UX Release 7.0: Sept 1989