diff --git a/tests/runner.pm b/tests/runner.pm index 94e28777e7..b1fe1854b0 100644 --- a/tests/runner.pm +++ b/tests/runner.pm @@ -189,7 +189,10 @@ sub runner_init { # TODO: set up better signal handlers $SIG{INT} = 'IGNORE'; $SIG{TERM} = 'IGNORE'; - $SIG{USR1} = 'IGNORE'; + eval { + # some msys2 perl versions don't define SIGUSR1 + $SIG{USR1} = 'IGNORE'; + }; $thisrunnerid = $$; print "Runner $thisrunnerid starting\n" if($verbose); diff --git a/tests/runtests.pl b/tests/runtests.pl index 7626912a54..c27fbfa227 100755 --- a/tests/runtests.pl +++ b/tests/runtests.pl @@ -271,7 +271,10 @@ sub catch_usr1 { } } -$SIG{USR1} = \&catch_usr1; +eval { + # some msys2 perl versions don't define SIGUSR1 + $SIG{USR1} = \&catch_usr1; +}; $SIG{PIPE} = 'IGNORE'; # these errors are captured in the read/write calls ##########################################################################