Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ gethost(2) — HP-UX 5.00

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

hostname(1)

uname(1)

sethostname(2)

uname(2)

GETHOSTNAME(2)

NAME

gethostname − get name of current host

SYNOPSIS

char hostname[];
gethostname(hostname, sizeof (hostname));

HP-UX COMPATIBILITY

Level: HP-UX/RUN ONLY

Origin: UCB

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.

Gethostname can fail if:

­[EFAULT] Hostname points to an illegal address. 

SEE ALSO

hostname(1), uname(1), sethostname(2), uname(2). 

Hewlett-Packard  —  last mod. May 11, 2021

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026