BSD 4_2 development
[unix-history] / usr / man / man2 / vhangup.2
CommitLineData
3abac3ab
C
1.TH VHANGUP 2 "12 Febuary 1983"
2.UC 4
3.SH NAME
4vhangup \- virtually ``hangup'' the current control terminal
5.SH SYNOPSIS
6.B vhangup()
7.SH DESCRIPTION
8.I Vhangup
9is used by the initialization process
10.IR init (8)
11(among others) to arrange that users are given
12\*(lqclean\*(rq' terminals at login,
13by revoking access of the previous users' processes to the terminal.
14To effect this,
15.I vhangup
16searches the system tables for references to the control terminal
17of the invoking process, revoking access permissions
18on each instance of the terminal which it finds.
19Further attempts to access the terminal by the affected processes
20will yield i/o errors (EBADF).
21Finally,
22a hangup signal (SIGHUP) is sent to the process group of the
23control terminal.
24.SH SEE ALSO
25init (8)
26.SH BUGS
27Access to
28the control terminal via
29.B /dev/tty
30is still possible.
31.PP
32This call should be replaced by an automatic mechanism which
33takes place on process exit.