This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
svleak.t: Enable syntax error tests under -Dmad
[perl5.git]
/
t
/
op
/
sigsystem.t
diff --git
a/t/op/sigsystem.t
b/t/op/sigsystem.t
index
c20d9d2
..
ddfebf9
100644
(file)
--- a/
t/op/sigsystem.t
+++ b/
t/op/sigsystem.t
@@
-2,6
+2,8
@@
BEGIN {
require './test.pl';
BEGIN {
require './test.pl';
+ skip_all_if_miniperl();
+ skip_all_without_config(qw(d_fork));
}
use strict;
}
use strict;
@@
-11,10
+13,17
@@
use Data::Dumper;
plan tests => 4;
SKIP: {
plan tests => 4;
SKIP: {
- skip 'Platform doesn\'t support SIGCHLD', 4 if
is_miniperl() or
not exists $SIG{CHLD};
+ skip 'Platform doesn\'t support SIGCHLD', 4 if not exists $SIG{CHLD};
require POSIX;
require Time::HiRes;
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: $$");
my $pid = fork // die "Can't fork: $!";
unless ($pid) {
note("Child PID: $$");
@@
-24,14
+33,6
@@
SKIP: {
test_system('without reaper');
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...");
test_system('with reaper');
note("Waiting briefly for SIGCHLD...");