Bug#541551: perl-base: detecting stopped child process fails using POSIX WIFSTOPPED

2009-08-19 Thread torp
This solves the problem! I want to be able to run the same program on both old and new systems, so rather than substituting $? for ${^CHILD_ERROR_NATIVE} directly, I substituted like so: WIFSTOPPED(( defined ${^CHILD_ERROR_NATIVE} ? ${^CHILD_ERROR_NATIVE} : $? )) For the benefit of the

Bug#541551: perl-base: detecting stopped child process fails using POSIX WIFSTOPPED

2009-08-18 Thread Brendan O'Dea
So it seems that this is an intentional upstream change*. The perlvar entry for $? now notes that it contains the 16-bit status word returned by the traditional Unix wait() system call (or else is made up to look like it). Thus, the exit value of the subprocess is really ($? 8), and $? 127

Bug#541551: perl-base: detecting stopped child process fails using POSIX WIFSTOPPED

2009-08-15 Thread Brendan O'Dea
On Sat, Aug 15, 2009 at 5:15 AM, torp1250272...@noid.net wrote: When perl is testing if a child process is stopped, the result of the WIFSTOPPED function is never correct: Thanks for the bug report Tor. It appears that the problem is actually with waitpid not setting $? correctly when the

Bug#541551: perl-base: detecting stopped child process fails using POSIX WIFSTOPPED

2009-08-14 Thread torp
Package: perl-base Version: 5.10.0-19 Severity: important When perl is testing if a child process is stopped, the result of the WIFSTOPPED function is never correct: #!/usr/bin/perl $|++; use POSIX; unless ( $pid = fork ) { print child: stopping self\n; kill STOP = $$;