waitpid doesn't work with WIFSTOPPED
> Quoth Emmanuel Rodriguez:
>> I'm see a strange behavior in the fonction WIFSTOPPED($?) when
>> waitpid($pid, WUNTRACED) is invoked and that the child process
>> receives a stop signal. Under this conditions one would expect that
>> WIFSTOPPED($?) would return a true value, but that's not what is
>> happening. A similar program written in C will have the same macro
>> return true instead of false under the same conditions.
>>
>> I can reproduce this with the default perl provided by Ubuntu 9.10 and
>> OS X 10.6. Which lets me guess that this is not a distro related bug.
>
> This is a documentation error. POSIX.pod incorrectly claims that
> you can pass the value of $? to WIFEXITED and its relatives.
> You must use the raw status value from ${^CHILD_ERROR_NATIVE} instead.
And here's the patch. Note that perlvar.pod gets it right already.
/Bo Lindbergh