diff options
author | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-03-05 10:26:19 +0100 |
---|---|---|
committer | Michael Kerrisk <mtk.manpages@gmail.com> | 2016-03-05 10:26:32 +0100 |
commit | 82b43a769287431483659a5302bfa990a96ffa4f (patch) | |
tree | e7ee56652a5bddafd09fe6571f7f82ff2649c740 | |
parent | 53562047851414d4aa4ffceeba534eac84a70fe5 (diff) | |
download | man-pages-82b43a769287431483659a5302bfa990a96ffa4f.tar.gz |
posix_spawn.3: Tweak a few more details
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
-rw-r--r-- | man3/posix_spawn.3 | 98 |
1 files changed, 51 insertions, 47 deletions
diff --git a/man3/posix_spawn.3 b/man3/posix_spawn.3 index 0a0cc0eb8c..b2dc8aa16f 100644 --- a/man3/posix_spawn.3 +++ b/man3/posix_spawn.3 @@ -224,7 +224,7 @@ process can accomplish before it executes the executable file. These operations are controlled by the attributes object pointed to by .IR attrp and the file actions object pointed to by -.I file_actions. +.IR file_actions . In the child, processing is done in the following sequence: .IP 1. 3 Process attribute actions: signal mask, signal default handlers, @@ -273,8 +273,10 @@ are as follows: .B POSIX_SPAWN_SETSIGMASK Set the signal mask to the signal set specified in the .I spawn-sigmask -attribute (see -.BR posix_spawnattr_setsigmask (3)) +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setsigmask (3)) of the object pointed to by .IR attrp . If the @@ -284,8 +286,10 @@ flag is not set, then the child inherits the parent's signal mask. .B POSIX_SPAWN_SETSIGDEF Reset the disposition of all signals in the set specified in the .I spawn-sigdefault -attribute (see -.BR posix_spawnattr_setsigdefault (3)) +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setsigdefault (3)) of the object pointed to by .IR attrp to the default. @@ -303,8 +307,10 @@ If this flag is set, and the flag is not set, then set the scheduling parameters to the parameters specified in the .I spawn-schedparam -attribute (see -.BR posix_spawnattr_setschedparam (3)) +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setschedparam (3)) of the object pointed to by .IR attrp . .TP @@ -315,29 +321,22 @@ as follows: .IP * 3 The scheduling policy is set to the value specified in the .I spawn-schedpolicy -attribute (see -.BR posix_spawnattr_setpolicy (3)) +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setpolicy (3)) of the object pointed to by .IR attrp . -.\" The following looks like a glibc bug, since POSIX says -.\" POSIX_SPAWN_SETSCHEDPARAM is ignored when POSIX_SPAWN_SETSCHEDULER -.\" is specified -.\" I filed http://sourceware.org/bugzilla/show_bug.cgi?id=12052 -.\" Depending on the outcome, the following section may need to be -.\" rewritten and a description of the current behavior added under BUGS. .IP * -If the -.B POSIX_SPAWN_SETSCHEDPARAM -flag is also set, -then the scheduling parameters are set to the value specified in the +The scheduling parameters are set to the value specified in the .I spawn-schedparam -attribute (see -.BR posix_spawnattr_setschedparam (3)) +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setschedparam (3)) of the object pointed to by -.IR attrp . -If the -.B POSIX_SPAWN_SETSCHEDPARAM -flag is not set, then the housekeeping in the child fails. +.IR attrp +(but see BUGS). .LP If the .B POSIX_SPAWN_SETSCHEDPARAM @@ -345,17 +344,6 @@ and .B POSIX_SPAWN_SETSCHEDPOLICY flags are not specified, the child inherits the corresponding scheduling attributes from the parent. -.\" Given a NULL 'param' argument, sched_setscheduler() fails with EINVAL. -.\" -.\" FIXME: The following seems to be misleading -.\" (If -.\" .I POSIX_SPAWN_SETSCHEDPARAM -.\" is also set, -.\" then the scheduling parameters are set according to the corresponding element; -.\" otherwise, the effect is as if a NULL was passed as the -.\" .I param -.\" argument to -.\" .BR sched_setscheduler (2)). .RE .TP .B POSIX_SPAWN_RESETIDS @@ -372,8 +360,10 @@ the setting of the effective UID and GID (se .B POSIX_SPAWN_SETPGROUP Set the process group to the value specified in the .I spawn-pgroup -attribute (see -.BR posix_spawnattr_setpgroup (3)) +attribute +.\" FIXME . +.\" (see +.\" .BR posix_spawnattr_setpgroup (3)) of the object pointed to by .IR attrp . If the @@ -429,7 +419,7 @@ and .BR posix_spawn_file_actions_adddup2 (3). The requested operations are performed in the order they were added to .IR file_actions . -.\" FIXME I think the following is best placed in the +.\" FIXME . I think the following is best placed in the .\" posix_spawn_file_actions_adddup2(3) page, and a similar statement is .\" also needed in posix_spawn_file_actions_addclose(3) .\" Note that you can specify file descriptors in @@ -541,7 +531,6 @@ argument as one of the files in the caller's .IR /proc/self/fd directory. .SH VERSIONS -.\" FIXME all of these pages should have a VERSIONS section The .BR posix_spawn () and @@ -550,13 +539,28 @@ functions are available since glibc 2.2. .SH CONFORMING TO .LP POSIX.1-2001, POSIX.1-2008. -.\" FIXME: This piece belongs in pthread_attr_setflags() -The -.B POSIX_SPAWN_USEVFORK -flag is a GNU extension; the -.B _GNU_SOURCE -feature test macro must be defined (before including any header files) -to obtain the definition of this constant. +.\" FIXME . This piece belongs in spawnattr_setflags(3) +.\" The +.\" .B POSIX_SPAWN_USEVFORK +.\" flag is a GNU extension; the +.\" .B _GNU_SOURCE +.\" feature test macro must be defined (before including any header files) +.\" to obtain the definition of this constant. +.SH BUGS +POSIX.1 says that when +.B POSIX_SPAWN_SETSCHEDULER +is specified in +.IR spawn-flags , +then the +.B POSIX_SPAWN_SETSCHEDPARAM +(if present) is ignored. +However, before glibc 2.14, calls to +.BR posix_spawn () +failed with an error if +.\" http://sourceware.org/bugzilla/show_bug.cgi?id=12052 +.BR POSIX_SPAWN_SETSCHEDULER +was specified without also specifying +.BR POSIX_SPAWN_SETSCHEDPARAM . .SH EXAMPLE The program below demonstrates the use of various functions in the POSIX spawn API. |