# We assume that TestInit has been used.
BEGIN {
+ chdir 't' if -d 't';
require './test.pl';
}
use Config;
plan tests => 29;
+$| = 1;
-watchdog(15);
+watchdog(25);
$SIG{ALRM} = sub {
die "Alarm!\n";
SKIP: {
skip('We can\'t test blocking without sigprocmask', 17)
if is_miniperl() || !$Config{d_sigprocmask};
- skip('This doesn\'t work on $^O threaded builds RT#88814', 17)
- if $^O =~ /openbsd|cygwin/ && $Config{useithreads};
+ skip("This doesn\'t work on $^O threaded builds RT#88814", 17)
+ if ($^O =~ /cygwin/ && $Config{useithreads});
+ skip("This doesn\'t work on $^O version $Config{osvers} RT#88814", 17)
+ if ($^O eq "openbsd" && $Config{osvers} < 5.2);
require POSIX;
my $pending = POSIX::SigSet->new();
# of a reliable way to probe for this, so for now, just skip the
# tests on production releases
skip("some OSes hang here", 3) if (int($]*1000) & 1) == 0;
-
+
+ SKIP: {
+ skip("Issues on Android", 3) if $^O =~ /android/;
my $action = POSIX::SigAction->new(sub { $gotit--, die }, POSIX::SigSet->new, 0);
POSIX::sigaction(&POSIX::SIGALRM, $action);
eval {
is $gotit, 0, 'Received both signals';
}
}
+}
SKIP: {
skip("alarm cannot interrupt blocking system calls on $^O", 2)
# [perl #45173]
{
- my $hup_called;
- local $SIG{HUP} = sub { $hup_called = 1 };
+ my $int_called;
+ local $SIG{INT} = sub { $int_called = 1; };
$@ = "died";
is($@, "died");
- kill 'HUP', $$;
- is($hup_called, 1);
+ kill 'INT', $$;
+ # this is needed to ensure signal delivery on MSWin32
+ sleep(1);
+ is($int_called, 1);
is($@, "died");
}