On Tue, Jan 3, 2017, at 10:08, Joerg Schilling wrote:
Random832 <random832(a)fastmail.com> wrote:
However, OSX only claims compliance to Issue 6
(unistd.h _XOPEN_VERSION
600), and the text requiring that the full 32-bit value be preserved is
new to Issue 7.
The text requiring the full 32-bit value is not new....
Is there some other text you have in mind other than "The exit value in
si_status shall be equal to the full exit value (that is, the value
passed to _exit(), _Exit(), or exit(), or returned from main()); it
shall not be limited to the least significant eight bits of the value."
in the description of signal.h (not present in Issue 6 or SUSv2)? Or
maybe something from "2.13. Status Information" (whole section is new in
Issue 7).
In SUSv2, the text of exit() states "If the parent process of the
calling process is executing a wait(), wait3(), waitid() or waitpid(),
[...] it is notified of the calling process' termination and the
low-order eight bits (that is, bits 0377) of status are made available
to it." with no indication of any of these functions allowing the parent
process to get more bits of status. More or less the same text appears
in Issue 6, with some rearrangement due to waitid being part of the XSI
option.
It was required in 1996 already, but then somebody
introduced a bug into
the text and that was not aligned with the expected behavior.
Oh, so there was a bug in *the text*. That would be the text of the
standard that OSX conforms to?