]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: work around a perl without SIGUSR1
authorDan Fandrich <dan@coneharvesters.com>
Thu, 22 Jun 2023 02:30:50 +0000 (19:30 -0700)
committerDan Fandrich <dan@coneharvesters.com>
Thu, 22 Jun 2023 06:22:07 +0000 (23:22 -0700)
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

tests/runner.pm
tests/runtests.pl

index 94e28777e742ba88f26ab81cef02833e2e2bd29a..b1fe1854b0e068ab48eeabc16b53e5456527a0f4 100644 (file)
@@ -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);
index 7626912a54a87dad27dd54ea75072ef27be3aaaa..c27fbfa227b0c023bf92fc283754bcfb20b86e34 100755 (executable)
@@ -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
 
 ##########################################################################