vhangup
Purpose
Performs a virtual hangup on the current control ter-
minal.
Syntax
int vhangup ( )
Description
The vhangup system call is used by the initialization
process init and other processes to ensure that users are
given a reset terminal at login time. To accomplish
this, vhangup searches the system tables for references
to the control terminal of the invoking process, then
revokes access permission for each instance of the ter-
minal that it finds. Further attempts to access the dis-
connected terminal yield an I/O error (EBADF). Finally,
the vhangup system call sends a hangup signal (SIGHUP) to
the process group of the control terminal.
The effective user ID of the calling process must be
superuser to use the vhangup system call.
Return Value
Upon successful completion, vhangup. returns 0. If
vhangup fails, it returns the value -1 and sets errno to
indicate the error.
Diagnostics
The vhangup system call fails if the following is true:
EPERM The effective user ID of the calling process
is not superuser.
Related Information
The description of init in the AIX Operating System Com-
mands Reference.