]> git.ipfire.org Git - thirdparty/man-pages.git/blob - man2/vhangup.2
All pages: Remove the 5th argument to .TH
[thirdparty/man-pages.git] / man2 / vhangup.2
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\"
3 .\" SPDX-License-Identifier: Linux-man-pages-copyleft
4 .\"
5 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
6 .\" Added notes on capability requirements
7 .\"
8 .TH VHANGUP 2 2021-03-22 "Linux man-pages (unreleased)"
9 .SH NAME
10 vhangup \- virtually hangup the current terminal
11 .SH LIBRARY
12 Standard C library
13 .RI ( libc ", " \-lc )
14 .SH SYNOPSIS
15 .nf
16 .B #include <unistd.h>
17 .PP
18 .B int vhangup(void);
19 .fi
20 .PP
21 .RS -4
22 Feature Test Macro Requirements for glibc (see
23 .BR feature_test_macros (7)):
24 .RE
25 .PP
26 .BR vhangup ():
27 .nf
28 Since glibc 2.21:
29 .\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8
30 _DEFAULT_SOURCE
31 In glibc 2.19 and 2.20:
32 _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
33 Up to and including glibc 2.19:
34 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
35 .fi
36 .SH DESCRIPTION
37 .BR vhangup ()
38 simulates a hangup on the current terminal.
39 This call arranges for other
40 users to have a \*(lqclean\*(rq terminal at login time.
41 .SH RETURN VALUE
42 On success, zero is returned.
43 On error, \-1 is returned, and
44 .I errno
45 is set to indicate the error.
46 .SH ERRORS
47 .TP
48 .B EPERM
49 The calling process has insufficient privilege to call
50 .BR vhangup ();
51 the
52 .B CAP_SYS_TTY_CONFIG
53 capability is required.
54 .SH STANDARDS
55 This call is Linux-specific, and should not be used in programs
56 intended to be portable.
57 .SH SEE ALSO
58 .BR init (1),
59 .BR capabilities (7)