diff options
| author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-09-12 07:09:29 +0100 |
|---|---|---|
| committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-09-12 07:39:40 +0100 |
| commit | 3d8af6034724aac8133d0c84196536c7ba89639e (patch) | |
| tree | 8249eb9998532b88fff2de397073befb7c38770f | |
| parent | 1986f065187371334f575c9340d81741c6fa354e (diff) | |
| download | man-pages-3d8af6034724aac8133d0c84196536c7ba89639e.tar.gz | |
getsid.2: Rework description to be somewhat clearer
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
| -rw-r--r-- | man2/getsid.2 | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/man2/getsid.2 b/man2/getsid.2 index 6443ec555b..2f8fab9156 100644 --- a/man2/getsid.2 +++ b/man2/getsid.2 @@ -1,4 +1,5 @@ .\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) +.\" and Copyright (C) 2016 Michael Kerrisk <mtk.manpages@gmail.com> .\" .\" %%%LICENSE_START(GPLv2+_DOC_FULL) .\" This is free documentation; you can redistribute it and/or @@ -50,11 +51,14 @@ _XOPEN_SOURCE\ >=\ 500 .SH DESCRIPTION .I getsid(0) returns the session ID of the calling process. -.I getsid(p) +.BR getsid () returns the session ID of the process with process ID -.IR p . -(The session ID of a process is the process ID of the -session leader.) +.IR pid . +If +.I pid +is 0, +.BR getsid () +returns the session ID of the calling process. .SH RETURN VALUE On success, a session ID is returned. On error, \fI(pid_t)\ \-1\fP will be returned, and @@ -81,6 +85,10 @@ POSIX.1-2001, POSIX.1-2008, SVr4. .SH NOTES Linux does not return .BR EPERM . + +See +.BR credentials (7) +for a description of sessions and session IDs. .SH SEE ALSO .BR getpgid (2), .BR setsid (2), |
