in reply to
how do I extract status from the response of waitpid ?
The exit code is '$? >> 8', not the returned value. $? is documented in
perlvar
man page.
Comment on
Re: how do I extract status from the response of waitpid ?
Replies are listed 'Best First'.
Re^2: how do I extract status from the response of waitpid ?
by
ikegami
(Patriarch)
on Aug 14, 2015 at 12:17 UTC
$? >> 8
is only meaningful if
waitpid
returned a value greater than zero and if
$? != -1 && ($? & 0x7F) == 0
.
[reply]
[d/l]
[select]
In Section
Seekers of Perl Wisdom