mirror of https://github.com/mkerrisk/man-pages
getsid.2: Rework description to be somewhat clearer
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
1986f06518
commit
3d8af60347
|
@ -1,4 +1,5 @@
|
||||||
.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
|
.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl)
|
||||||
|
.\" and Copyright (C) 2016 Michael Kerrisk <mtk.manpages@gmail.com>
|
||||||
.\"
|
.\"
|
||||||
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
.\" %%%LICENSE_START(GPLv2+_DOC_FULL)
|
||||||
.\" This is free documentation; you can redistribute it and/or
|
.\" This is free documentation; you can redistribute it and/or
|
||||||
|
@ -50,11 +51,14 @@ _XOPEN_SOURCE\ >=\ 500
|
||||||
.SH DESCRIPTION
|
.SH DESCRIPTION
|
||||||
.I getsid(0)
|
.I getsid(0)
|
||||||
returns the session ID of the calling process.
|
returns the session ID of the calling process.
|
||||||
.I getsid(p)
|
.BR getsid ()
|
||||||
returns the session ID of the process with process ID
|
returns the session ID of the process with process ID
|
||||||
.IR p .
|
.IR pid .
|
||||||
(The session ID of a process is the process ID of the
|
If
|
||||||
session leader.)
|
.I pid
|
||||||
|
is 0,
|
||||||
|
.BR getsid ()
|
||||||
|
returns the session ID of the calling process.
|
||||||
.SH RETURN VALUE
|
.SH RETURN VALUE
|
||||||
On success, a session ID is returned.
|
On success, a session ID is returned.
|
||||||
On error, \fI(pid_t)\ \-1\fP will be returned, and
|
On error, \fI(pid_t)\ \-1\fP will be returned, and
|
||||||
|
@ -81,6 +85,10 @@ POSIX.1-2001, POSIX.1-2008, SVr4.
|
||||||
.SH NOTES
|
.SH NOTES
|
||||||
Linux does not return
|
Linux does not return
|
||||||
.BR EPERM .
|
.BR EPERM .
|
||||||
|
|
||||||
|
See
|
||||||
|
.BR credentials (7)
|
||||||
|
for a description of sessions and session IDs.
|
||||||
.SH SEE ALSO
|
.SH SEE ALSO
|
||||||
.BR getpgid (2),
|
.BR getpgid (2),
|
||||||
.BR setsid (2),
|
.BR setsid (2),
|
||||||
|
|
Loading…
Reference in New Issue