1vhangup(2)                       System Calls                       vhangup(2)
2
3
4

NAME

6       vhangup - virtually "hangup" the current controlling terminal
7

SYNOPSIS

9       #include <unistd.h>
10
11       void vhangup(void);
12
13

DESCRIPTION

15       The  vhangup()  function is used by the initialization process init(1M)
16       (among others) to ensure that users  are  given  "clean"  terminals  at
17       login by revoking access of the previous users' processes to the termi‐
18       nal. To effect this, vhangup() searches the system  tables  for  refer‐
19       ences  to  the controlling terminal of the invoking process and revokes
20       access permissions on each instance of the terminal that it finds. Fur‐
21       ther  attempts  to  access  the terminal by the affected processes will
22       yield I/O errors (EBADF or EIO). A SIGHUP (hangup signal)  is  sent  to
23       the process group of the controlling terminal.
24

SEE ALSO

26       init(1M)
27

BUGS

29       Access to the controlling terminal using /dev/tty is still possible.
30
31
32       This call should be replaced by an automatic mechanism that takes place
33       on process exit.
34
35
36
37SunOS 5.11                        19 Mar 1998                       vhangup(2)
Impressum