OSDN Git Service

LDP: Update original to LDP v3.68
[linuxjm/LDP_man-pages.git] / original / man2 / vhangup.2
1 .\" Copyright 1993 Rickard E. Faith (faith@cs.unc.edu)
2 .\"
3 .\" %%%LICENSE_START(VERBATIM)
4 .\" Permission is granted to make and distribute verbatim copies of this
5 .\" manual provided the copyright notice and this permission notice are
6 .\" preserved on all copies.
7 .\"
8 .\" Permission is granted to copy and distribute modified versions of this
9 .\" manual under the conditions for verbatim copying, provided that the
10 .\" entire resulting derived work is distributed under the terms of a
11 .\" permission notice identical to this one.
12 .\"
13 .\" Since the Linux kernel and libraries are constantly changing, this
14 .\" manual page may be incorrect or out-of-date.  The author(s) assume no
15 .\" responsibility for errors or omissions, or for damages resulting from
16 .\" the use of the information contained herein.  The author(s) may not
17 .\" have taken the same level of care in the production of this manual,
18 .\" which is licensed free of charge, as they might when working
19 .\" professionally.
20 .\"
21 .\" Formatted or processed versions of this manual, if unaccompanied by
22 .\" the source, must acknowledge the copyright and authors of this work.
23 .\" %%%LICENSE_END
24 .\"
25 .\" Modified, 27 May 2004, Michael Kerrisk <mtk.manpages@gmail.com>
26 .\"     Added notes on capability requirements
27 .\"
28 .TH VHANGUP 2 2007-07-26 "Linux" "Linux Programmer's Manual"
29 .SH NAME
30 vhangup \- virtually hangup the current terminal
31 .SH SYNOPSIS
32 .B #include <unistd.h>
33 .sp
34 .B int vhangup(void);
35 .sp
36 .in -4n
37 Feature Test Macro Requirements for glibc (see
38 .BR feature_test_macros (7)):
39 .in
40 .sp
41 .ad l
42 .BR vhangup ():
43 _BSD_SOURCE || (_XOPEN_SOURCE && _XOPEN_SOURCE\ <\ 500)
44 .ad b
45 .SH DESCRIPTION
46 .BR vhangup ()
47 simulates a hangup on the current terminal.
48 This call arranges for other
49 users to have a \*(lqclean\*(rq terminal at login time.
50 .SH RETURN VALUE
51 On success, zero is returned.
52 On error, \-1 is returned, and
53 .I errno
54 is set appropriately.
55 .SH ERRORS
56 .TP
57 .B EPERM
58 The calling process has insufficient privilege to call
59 .BR vhangup ();
60 the
61 .B CAP_SYS_TTY_CONFIG
62 capability is required.
63 .SH CONFORMING TO
64 This call is Linux-specific, and should not be used in programs
65 intended to be portable.
66 .SH SEE ALSO
67 .BR capabilities (7),
68 .BR init (8)
69 .SH COLOPHON
70 This page is part of release 3.68 of the Linux
71 .I man-pages
72 project.
73 A description of the project,
74 information about reporting bugs,
75 and the latest version of this page,
76 can be found at
77 \%http://www.kernel.org/doc/man\-pages/.