From 9a6ff5bc53dedbaa601a1a76cbaf8a76afd60c9f Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Mon, 15 Apr 2024 21:41:06 +0200 Subject: Adding upstream version 6.7. Signed-off-by: Daniel Baumann --- man2/setpgid.2 | 48 ++++++++++++++++++++++++------------------------ 1 file changed, 24 insertions(+), 24 deletions(-) (limited to 'man2/setpgid.2') diff --git a/man2/setpgid.2 b/man2/setpgid.2 index 2d8bc96..b3983c4 100644 --- a/man2/setpgid.2 +++ b/man2/setpgid.2 @@ -17,7 +17,7 @@ .\" 2007-07-25, mtk, fairly substantial rewrites and rearrangements .\" of text. .\" -.TH setpgid 2 2023-03-30 "Linux man-pages 6.05.01" +.TH setpgid 2 2023-10-31 "Linux man-pages 6.7" .SH NAME setpgid, getpgid, setpgrp, getpgrp \- set/get process group .SH LIBRARY @@ -26,29 +26,29 @@ Standard C library .SH SYNOPSIS .nf .B #include -.PP +.P .BI "int setpgid(pid_t " pid ", pid_t " pgid ); .BI "pid_t getpgid(pid_t " pid ); -.PP +.P .BR "pid_t getpgrp(void);" " /* POSIX.1 version */" .BI "[[deprecated]] pid_t getpgrp(pid_t " pid ");\fR /* BSD version */" -.PP +.P .BR "int setpgrp(void);" " /* System V version */" .BI "[[deprecated]] int setpgrp(pid_t " pid ", pid_t " pgid ");\fR /* BSD version */" .fi -.PP +.P .RS -4 Feature Test Macro Requirements for glibc (see .BR feature_test_macros (7)): .RE -.PP +.P .BR getpgid (): .nf _XOPEN_SOURCE >= 500 .\" || _XOPEN_SOURCE && _XOPEN_SOURCE_EXTENDED || /* Since glibc 2.12: */ _POSIX_C_SOURCE >= 200809L .fi -.PP +.P .BR setpgrp "() (POSIX.1):" .nf _XOPEN_SOURCE >= 500 @@ -56,7 +56,7 @@ Feature Test Macro Requirements for glibc (see || /* Since glibc 2.19: */ _DEFAULT_SOURCE || /* glibc <= 2.19: */ _SVID_SOURCE .fi -.PP +.P .BR setpgrp "() (BSD)," .BR getpgrp "() (BSD):" .nf @@ -74,7 +74,7 @@ The preferred, POSIX.1-specified ways of doing this are: for retrieving the calling process's PGID; and .BR setpgid (), for setting a process's PGID. -.PP +.P .BR setpgid () sets the PGID of the process specified by .I pid @@ -99,12 +99,12 @@ and In this case, the \fIpgid\fP specifies an existing process group to be joined and the session ID of that group must match the session ID of the joining process. -.PP +.P The POSIX.1 version of .BR getpgrp (), which takes no arguments, returns the PGID of the calling process. -.PP +.P .BR getpgid () returns the PGID of the process specified by .IR pid . @@ -115,12 +115,12 @@ is zero, the process ID of the calling process is used. necessary, and the POSIX.1 .BR getpgrp () is preferred for that task.) -.PP +.P The System\ V-style .BR setpgrp (), which takes no arguments, is equivalent to .IR "setpgid(0,\ 0)" . -.PP +.P The BSD-specific .BR setpgrp () call, which takes arguments @@ -128,13 +128,13 @@ call, which takes arguments and .IR pgid , is a wrapper function that calls -.PP +.P .in +4n .EX setpgid(pid, pgid) .EE .in -.PP +.P .\" The true BSD setpgrp() system call differs in allowing the PGID .\" to be set to arbitrary values, rather than being restricted to .\" PGIDs in the same session. @@ -145,19 +145,19 @@ function is no longer exposed by calls should be replaced with the .BR setpgid () call shown above. -.PP +.P The BSD-specific .BR getpgrp () call, which takes a single .I pid argument, is a wrapper function that calls -.PP +.P .in +4n .EX getpgid(pid) .EE .in -.PP +.P Since glibc 2.19, the BSD-specific .BR getpgrp () function is no longer exposed by @@ -177,11 +177,11 @@ return zero. On error, \-1 is returned, and .I errno is set to indicate the error. -.PP +.P The POSIX.1 .BR getpgrp () always returns the PGID of the caller. -.PP +.P .BR getpgid (), and the BSD-specific .BR getpgrp () @@ -266,12 +266,12 @@ A child created via inherits its parent's process group ID. The PGID is preserved across an .BR execve (2). -.PP +.P Each process group is a member of a session and each process is a member of the session of which its process group is a member. (See .BR credentials (7).) -.PP +.P A session can have a controlling terminal. At any time, one (and only one) of the process groups in the session can be the foreground process group @@ -298,7 +298,7 @@ and .BR tcsetpgrp (3) functions are used to get/set the foreground process group of the controlling terminal. -.PP +.P The .BR setpgid () and @@ -306,7 +306,7 @@ and calls are used by programs such as .BR bash (1) to create process groups in order to implement shell job control. -.PP +.P If the termination of a process causes a process group to become orphaned, and if any member of the newly orphaned process group is stopped, then a .B SIGHUP -- cgit v1.2.3