File: vhangup.2

package info (click to toggle)
manpages 6.15-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 20,184 kB
  • sloc: sh: 575; python: 222; perl: 190; makefile: 29; lisp: 22
file content (55 lines) | stat: -rw-r--r-- 1,256 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
.\" Copyright, the authors of the Linux man-pages project
.\"
.\" SPDX-License-Identifier: Linux-man-pages-copyleft
.\"
.TH vhangup 2 2025-05-17 "Linux man-pages (unreleased)"
.SH NAME
vhangup \- virtually hangup the current terminal
.SH LIBRARY
Standard C library
.RI ( libc ,\~ \-lc )
.SH SYNOPSIS
.nf
.B #include <unistd.h>
.P
.B int vhangup(void);
.fi
.P
.RS -4
Feature Test Macro Requirements for glibc (see
.BR feature_test_macros (7)):
.RE
.P
.BR vhangup ():
.nf
    Since glibc 2.21:
.\"		commit 266865c0e7b79d4196e2cc393693463f03c90bd8
        _DEFAULT_SOURCE
    In glibc 2.19 and 2.20:
        _DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
    Up to and including glibc 2.19:
        _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500)
.fi
.SH DESCRIPTION
.BR vhangup ()
simulates a hangup on the current terminal.
This call arranges for other
users to have a \*(lqclean\*(rq terminal at login time.
.SH RETURN VALUE
On success, zero is returned.
On error, \-1 is returned, and
.I errno
is set to indicate the error.
.SH ERRORS
.TP
.B EPERM
The calling process has insufficient privilege to call
.BR vhangup ();
the
.B CAP_SYS_TTY_CONFIG
capability is required.
.SH STANDARDS
Linux.
.SH SEE ALSO
.BR init (1),
.BR capabilities (7)