1vhangup(2) System Calls Manual vhangup(2)
2
3
4
6 vhangup - virtually hangup the current terminal
7
9 Standard C library (libc, -lc)
10
12 #include <unistd.h>
13
14 int vhangup(void);
15
16 Feature Test Macro Requirements for glibc (see feature_test_macros(7)):
17
18 vhangup():
19 Since glibc 2.21:
20 _DEFAULT_SOURCE
21 In glibc 2.19 and 2.20:
22 _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
23 Up to and including glibc 2.19:
24 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
25
27 vhangup() simulates a hangup on the current terminal. This call ar‐
28 ranges for other users to have a “clean” terminal at login time.
29
31 On success, zero is returned. On error, -1 is returned, and errno is
32 set to indicate the error.
33
35 EPERM The calling process has insufficient privilege to call
36 vhangup(); the CAP_SYS_TTY_CONFIG capability is required.
37
39 Linux.
40
42 init(1), capabilities(7)
43
44
45
46Linux man-pages 6.05 2023-03-30 vhangup(2)