aboutsummaryrefslogtreecommitdiff
path: root/manual
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2016-04-14 08:54:57 +0200
committerFlorian Weimer <fweimer@redhat.com>2016-04-14 08:54:57 +0200
commitb49ab5f4503f36dcbf43f821f817da66b2931fe6 (patch)
tree3b3eb99facf62df3f8f436ef71a66aee7c953c2c /manual
parent5f5682b9654101ccaf375c2814cbddbe6033a725 (diff)
downloadglibc-b49ab5f4503f36dcbf43f821f817da66b2931fe6.zip
glibc-b49ab5f4503f36dcbf43f821f817da66b2931fe6.tar.gz
glibc-b49ab5f4503f36dcbf43f821f817da66b2931fe6.tar.bz2
Remove union wait [BZ #19613]
The overloading approach in the W* macros was incompatible with integer expressions of a type different from int. Applications using union wait and these macros will have to migrate to the POSIX-specified int status type.
Diffstat (limited to 'manual')
-rw-r--r--manual/process.texi48
1 files changed, 6 insertions, 42 deletions
diff --git a/manual/process.texi b/manual/process.texi
index aa59040..25bdb8e 100644
--- a/manual/process.texi
+++ b/manual/process.texi
@@ -763,53 +763,17 @@ signal number of the signal that caused the child process to stop.
@node BSD Wait Functions
-@section BSD Process Wait Functions
+@section BSD Process Wait Function
-@Theglibc{} also provides these related facilities for compatibility
-with BSD Unix. BSD uses the @code{union wait} data type to represent
-status values rather than an @code{int}. The two representations are
-actually interchangeable; they describe the same bit patterns. @Theglibc{}
-defines macros such as @code{WEXITSTATUS} so that they will
-work on either kind of object, and the @code{wait} function is defined
-to accept either type of pointer as its @var{status-ptr} argument.
-
-These functions are declared in @file{sys/wait.h}.
+@Theglibc{} also provides the @code{wait3} function for compatibility
+with BSD. This function is declared in @file{sys/wait.h}. It is the
+predecessor to @code{wait4}, which is more flexible. @code{wait3} is
+now obsolete.
@pindex sys/wait.h
@comment sys/wait.h
@comment BSD
-@deftp {Data Type} {union wait}
-This data type represents program termination status values. It has
-the following members:
-
-@table @code
-@item int w_termsig
-The value of this member is the same as that of the
-@code{WTERMSIG} macro.
-
-@item int w_coredump
-The value of this member is the same as that of the
-@code{WCOREDUMP} macro.
-
-@item int w_retcode
-The value of this member is the same as that of the
-@code{WEXITSTATUS} macro.
-
-@item int w_stopsig
-The value of this member is the same as that of the
-@code{WSTOPSIG} macro.
-@end table
-
-Instead of accessing these members directly, you should use the
-equivalent macros.
-@end deftp
-
-The @code{wait3} function is the predecessor to @code{wait4}, which is
-more flexible. @code{wait3} is now obsolete.
-
-@comment sys/wait.h
-@comment BSD
-@deftypefun pid_t wait3 (union wait *@var{status-ptr}, int @var{options}, struct rusage *@var{usage})
+@deftypefun pid_t wait3 (int *@var{status-ptr}, int @var{options}, struct rusage *@var{usage})
@safety{@prelim{}@mtsafe{}@assafe{}@acsafe{}}
If @var{usage} is a null pointer, @code{wait3} is equivalent to
@code{waitpid (-1, @var{status-ptr}, @var{options})}.