vhangup(2) System Calls Manual vhangup(2)
Name
vhangup - virtually hang up the current control terminal
Syntax
void vhangup()
Description
The system call initializes a terminal line. For example, the command uses to ensure that the previous user's processes cannot access the
terminal anymore.
First, searches the system tables for references to the current terminal (the control terminal of the invoking process) and revokes access
permissions on each instance of the terminal that it finds.
The system call also removes all references to the inode that corresponds to the control terminal. The system call then invokes the ker-
nel's device close routine to turn the terminal off. Finally, sends a hangup signal (SIGHUP) to the process group of the control terminal.
For further information, see for a description of process groups.
When finishes, a terminal line is initialized; no other processes refer to this line. The only way for other processes to access the con-
trol terminal is through the special file, All other requests will yield I/O errors (EBADF).
See Also
init(8)
vhangup(2)