Commit | Line | Data |
---|---|---|
db6093a6 KM |
1 | .\" Copyright (c) 1980 Regents of the University of California. |
2 | .\" All rights reserved. The Berkeley software License Agreement | |
3 | .\" specifies the terms and conditions for redistribution. | |
4 | .\" | |
eff6446c | 5 | .\" @(#)vhangup.2 6.2 (Berkeley) %G% |
db6093a6 | 6 | .\" |
481eef88 | 7 | .TH VHANGUP 2 "" |
db6093a6 KM |
8 | .UC 4 |
9 | .SH NAME | |
10 | vhangup \- virtually ``hangup'' the current control terminal | |
11 | .SH SYNOPSIS | |
12 | .B vhangup() | |
13 | .SH DESCRIPTION | |
14 | .I Vhangup | |
15 | is used by the initialization process | |
16 | .IR init (8) | |
b348647a KM |
17 | (among others) to arrange that users are given |
18 | \*(lqclean\*(rq' terminals at login, | |
db6093a6 KM |
19 | by revoking access of the previous users' processes to the terminal. |
20 | To effect this, | |
21 | .I vhangup | |
22 | searches the system tables for references to the control terminal | |
23 | of the invoking process, revoking access permissions | |
eff6446c | 24 | on each instance of the terminal that it finds. |
db6093a6 KM |
25 | Further attempts to access the terminal by the affected processes |
26 | will yield i/o errors (EBADF). | |
27 | Finally, | |
28 | a hangup signal (SIGHUP) is sent to the process group of the | |
29 | control terminal. | |
30 | .SH SEE ALSO | |
31 | init (8) | |
32 | .SH BUGS | |
33 | Access to | |
34 | the control terminal via | |
35 | .B /dev/tty | |
36 | is still possible. | |
37 | .PP | |
eff6446c | 38 | This call should be replaced by an automatic mechanism that |
b348647a | 39 | takes place on process exit. |