Reduced the script to:
#!./perl
BEGIN {
chdir 't' if -d 't';
unshift @INC, '../lib';
}
use Test::More tests => 1;
use strict;
use POSIX qw(%SIGRT SIGRTMIN);
my $sigrtmin;
my $h = sub { $sigrtmin = 1 };
$SIGRT{SIGRTMIN} = $h;
kill 'SIGRTMIN', $$;
is($sigrtmin, 1, "SIGRTMIN handler works");
Running it (without threads):
./perl harness -v sigaction.t
sigaction....1..1
not ok 1 - SIGRTMIN handler works
# Failed test 'SIGRTMIN handler works'
# at sigaction.t line 19.
# got: undef
# expected: '1'
# Looks like you failed 1 test of 1.
dubious
Test returned status 1 (wstat 256, 0x100)
DIED. FAILED test 1
Failed 1/1 tests, 0.00% okay
Failed Test Stat Wstat Total Fail List of Failed
-------------------------------------------------------------------------------
sigaction.t 1 256 1 1 1
Failed 1/1 test scripts. 1/1 subtests failed.
Files=1, Tests=1, 0 wallclock secs ( 0.11 cusr + 0.02 csys = 0.13 CPU)
Failed 1/1 test programs. 1/1 subtests failed.
./perl sigaction.t
1..1
ok 1 - SIGRTMIN handler works
Running it with -Duseithreads:
./perl harness -v sigaction.t
sigaction....1..1
ok 1 - SIGRTMIN handler works
ok
All tests successful.
Files=1, Tests=1, 0 wallclock secs ( 0.14 cusr + 0.03 csys = 0.17 CPU)
./perl sigaction.t
1..1
ok 1 - SIGRTMIN handler works
Can anyone offer some clues?
Kind regards,
Bram