| 1 |
.\" Copyright 1993, Rickard E. Faith <[email protected]> |
| 2 |
.\" Copyright, the authors of the Linux man-pages project |
| 3 |
.\" |
| 4 |
.\" SPDX-License-Identifier: Linux-man-pages-copyleft |
| 5 |
.\" |
| 6 |
.TH vhangup 2 2026-02-08 "Linux man-pages 6.18" |
| 7 |
.SH NAME |
| 8 |
vhangup \- virtually hangup the current terminal |
| 9 |
.SH LIBRARY |
| 10 |
Standard C library |
| 11 |
.RI ( libc ,\~ \-lc ) |
| 12 |
.SH SYNOPSIS |
| 13 |
.nf |
| 14 |
.B #include <unistd.h> |
| 15 |
.P |
| 16 |
.B int vhangup(void); |
| 17 |
.fi |
| 18 |
.P |
| 19 |
.RS -4 |
| 20 |
Feature Test Macro Requirements for glibc (see |
| 21 |
.BR feature_test_macros (7)): |
| 22 |
.RE |
| 23 |
.P |
| 24 |
.BR vhangup (): |
| 25 |
.nf |
| 26 |
Since glibc 2.21: |
| 27 |
.\" commit 266865c0e7b79d4196e2cc393693463f03c90bd8 |
| 28 |
_DEFAULT_SOURCE |
| 29 |
In glibc 2.19 and 2.20: |
| 30 |
_DEFAULT_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) |
| 31 |
Up to and including glibc 2.19: |
| 32 |
_BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE < 500) |
| 33 |
.fi |
| 34 |
.SH DESCRIPTION |
| 35 |
.BR vhangup () |
| 36 |
simulates a hangup on the current terminal. |
| 37 |
This call arranges for other |
| 38 |
users to have a \*(lqclean\*(rq terminal at login time. |
| 39 |
.SH RETURN VALUE |
| 40 |
On success, zero is returned. |
| 41 |
On error, \-1 is returned, and |
| 42 |
.I errno |
| 43 |
is set to indicate the error. |
| 44 |
.SH ERRORS |
| 45 |
.TP |
| 46 |
.B EPERM |
| 47 |
The calling process has insufficient privilege to call |
| 48 |
.BR vhangup (); |
| 49 |
the |
| 50 |
.B CAP_SYS_TTY_CONFIG |
| 51 |
capability is required. |
| 52 |
.SH STANDARDS |
| 53 |
Linux. |
| 54 |
.SH SEE ALSO |
| 55 |
.BR init (1), |
| 56 |
.BR capabilities (7) |