]> git.ipfire.org Git - thirdparty/man-pages.git/blame - man/man2/vhangup.2
man/, share/mk/: Move man*/ to man/
[thirdparty/man-pages.git] / man / man2 / vhangup.2
CommitLineData
fea681da
MK
1.\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2.\"
5fbde956 3.\" SPDX-License-Identifier: Linux-man-pages-copyleft
a781c7d0 4.\"
c11b1abf 5.\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
fea681da
MK
6.\" Added notes on capability requirements
7.\"
4c1c5274 8.TH vhangup 2 (date) "Linux man-pages (unreleased)"
fea681da 9.SH NAME
1285ff3d 10vhangup \- virtually hangup the current terminal
81d389fd
AC
11.SH LIBRARY
12Standard C library
8fc3b2cf 13.RI ( libc ", " \-lc )
fea681da 14.SH SYNOPSIS
4653ec6e 15.nf
fea681da 16.B #include <unistd.h>
c6d039a3 17.P
fea681da 18.B int vhangup(void);
4653ec6e 19.fi
c6d039a3 20.P
d39ad78f 21.RS -4
cc4615cc
MK
22Feature Test Macro Requirements for glibc (see
23.BR feature_test_macros (7)):
d39ad78f 24.RE
c6d039a3 25.P
cc4615cc 26.BR vhangup ():
d0544534
MK
27.nf
28 Since glibc 2.21:
29.\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8
30 _DEFAULT_SOURCE
31 In glibc 2.19 and 2.20:
5c10d2c5 32 _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
d0544534 33 Up to and including glibc 2.19:
5c10d2c5 34 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
d0544534 35.fi
fea681da 36.SH DESCRIPTION
e511ffb6 37.BR vhangup ()
c13182ef
MK
38simulates a hangup on the current terminal.
39This call arranges for other
1285ff3d 40users to have a \*(lqclean\*(rq terminal at login time.
47297adb 41.SH RETURN VALUE
c13182ef
MK
42On success, zero is returned.
43On error, \-1 is returned, and
fea681da 44.I errno
f6a4078b 45is set to indicate the error.
fea681da
MK
46.SH ERRORS
47.TP
48.B EPERM
c13182ef 49The calling process has insufficient privilege to call
e511ffb6 50.BR vhangup ();
fea681da
MK
51the
52.B CAP_SYS_TTY_CONFIG
53capability is required.
3113c7f3 54.SH STANDARDS
4131356c 55Linux.
47297adb 56.SH SEE ALSO
fe0960af
MK
57.BR init (1),
58.BR capabilities (7)