In perl.git, the branch blead has been updated <http://perl5.git.perl.org/perl.git/commitdiff/c5e8d5cb14d8999b3dd37aa58729254df170be03?hp=00bf6ed28afa283a66a5789008ed58cb0f9079e8>
- Log ----------------------------------------------------------------- commit c5e8d5cb14d8999b3dd37aa58729254df170be03 Author: Leon Timmermans <faw...@gmail.com> Date: Wed Sep 12 15:38:44 2012 +0200 Eradicate race condition in t/op/sigsystem.t (#114562) ----------------------------------------------------------------------- Summary of changes: t/op/sigsystem.t | 15 +++++++-------- 1 files changed, 7 insertions(+), 8 deletions(-) diff --git a/t/op/sigsystem.t b/t/op/sigsystem.t index 197ecb2..ddfebf9 100644 --- a/t/op/sigsystem.t +++ b/t/op/sigsystem.t @@ -17,6 +17,13 @@ SKIP: { require POSIX; require Time::HiRes; + my @pids; + $SIG{CHLD} = sub { + while ((my $child = waitpid(-1, POSIX::WNOHANG())) > 0) { + note "Reaped: $child"; + push @pids, $child; + } + }; my $pid = fork // die "Can't fork: $!"; unless ($pid) { note("Child PID: $$"); @@ -26,14 +33,6 @@ SKIP: { test_system('without reaper'); - my @pids; - $SIG{CHLD} = sub { - while ((my $child = waitpid(-1, POSIX::WNOHANG())) > 0) { - note "Reaped: $child"; - push @pids, $child; - } - }; - test_system('with reaper'); note("Waiting briefly for SIGCHLD..."); -- Perl5 Master Repository