From: Dan Fandrich Date: Thu, 22 Jun 2023 02:30:50 +0000 (-0700) Subject: runtests: work around a perl without SIGUSR1 X-Git-Tag: curl-8_2_0~56 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=0526525c33ca4ad17eebd56ca0309922eb9fb15e;p=thirdparty%2Fcurl.git runtests: work around a perl without SIGUSR1 At least msys2 perl v5.32.1 doesn't seem to define this signal. Since this signal is only used for debugging, just ignore if setting it fails. Reported-by: Marcel Raad Fixes #11350 Closes #11366 --- 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 ##########################################################################