standards/187378: stdlib.h doesn't define W* macros (e.g. WEXITSTATUS)
wollman at csail.mit.edu
Tue Mar 11 18:24:27 UTC 2014
<<On Wed, 12 Mar 2014 04:30:55 +1100 (EST), Bruce Evans <brde at optusnet.com.au> said:
> This was a bug in XSI. You can't even use these macros without doing
> something nonstandard to get a value that they apply too.
> Unfortunately, the infestation has now spread to POSIX itself -- this is
> now shaded CX instead of XSI in the above URL.
See RETURN VALUE for system() at XSHv7 page 2069:
If command is not a null pointer, system ( ) shall return the
termination status of the command language interpreter in the
format specified by waitpid ( ). The termination status shall
be as defined for the sh utility; otherwise, the termination
status is unspecified. If some error prevents the command
language interpreter from executing after the child process is
created, the return value from system ( ) shall be as if the
command language interpreter had terminated using exit(127) or
_exit(127). If a child process cannot be created, or if the
termination status for the command language interpreter cannot
be obtained, system ( ) shall return -1 and set errno to
indicate the error.
This paragraph is also shaded CX, not XSI, and was CX in XSHv6 (at
More information about the freebsd-standards