diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-15 19:43:11 +0000 |
commit | fc22b3d6507c6745911b9dfcc68f1e665ae13dbc (patch) | |
tree | ce1e3bce06471410239a6f41282e328770aa404a /upstream/opensuse-tumbleweed/man2/getsid.2 | |
parent | Initial commit. (diff) | |
download | manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.tar.xz manpages-l10n-fc22b3d6507c6745911b9dfcc68f1e665ae13dbc.zip |
Adding upstream version 4.22.0.upstream/4.22.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'upstream/opensuse-tumbleweed/man2/getsid.2')
-rw-r--r-- | upstream/opensuse-tumbleweed/man2/getsid.2 | 75 |
1 files changed, 75 insertions, 0 deletions
diff --git a/upstream/opensuse-tumbleweed/man2/getsid.2 b/upstream/opensuse-tumbleweed/man2/getsid.2 new file mode 100644 index 00000000..842c9802 --- /dev/null +++ b/upstream/opensuse-tumbleweed/man2/getsid.2 @@ -0,0 +1,75 @@ +.\" Copyright (C) 1996 Andries Brouwer (aeb@cwi.nl) +.\" and Copyright (C) 2016 Michael Kerrisk <mtk.manpages@gmail.com> +.\" +.\" SPDX-License-Identifier: GPL-2.0-or-later +.\" +.\" Modified Thu Oct 31 14:18:40 1996 by Eric S. Raymond <esr@y\thyrsus.com> +.\" Modified 2001-12-17, aeb +.TH getsid 2 2023-03-30 "Linux man-pages 6.05.01" +.SH NAME +getsid \- get session ID +.SH LIBRARY +Standard C library +.RI ( libc ", " \-lc ) +.SH SYNOPSIS +.nf +.B #include <unistd.h> +.PP +.BI "pid_t getsid(pid_t" " pid" ); +.fi +.PP +.RS -4 +Feature Test Macro Requirements for glibc (see +.BR feature_test_macros (7)): +.RE +.PP +.BR getsid (): +.nf + _XOPEN_SOURCE >= 500 +.\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED + || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L +.fi +.SH DESCRIPTION +.BR getsid () +returns the session ID of the process with process ID +.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 is returned, and +.I errno +is set to indicate the error. +.SH ERRORS +.TP +.B EPERM +A process with process ID +.I pid +exists, but it is not in the same session as the calling process, +and the implementation considers this an error. +.TP +.B ESRCH +No process with process ID +.I pid +was found. +.SH VERSIONS +Linux does not return +.BR EPERM . +.SH STANDARDS +POSIX.1-2008. +.SH HISTORY +POSIX.1-2001, SVr4. +Linux 2.0. +.\" Linux has this system call since Linux 1.3.44. +.\" There is libc support since libc 5.2.19. +.SH NOTES +See +.BR credentials (7) +for a description of sessions and session IDs. +.SH SEE ALSO +.BR getpgid (2), +.BR setsid (2), +.BR credentials (7) |