This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Do not use bareword TERM or KILL in kill() call in test watchdog process
authorSteve Hay <steve.m.hay@googlemail.com>
Sat, 9 May 2015 13:49:11 +0000 (14:49 +0100)
committerSteve Hay <steve.m.hay@googlemail.com>
Sat, 9 May 2015 13:49:11 +0000 (14:49 +0100)
t/test.pl

index ef33e88..7063506 100644 (file)
--- a/t/test.pl
+++ b/t/test.pl
@@ -1591,7 +1591,7 @@ sub watchdog ($;$)
                 my $sig = $is_vms ? 'TERM' : 'KILL';
                 my $cmd = _create_runperl( prog =>  "sleep($timeout);" .
                                                     "warn qq/# $timeout_msg" . '\n/;' .
-                                                    "kill($sig, $pid_to_kill);");
+                                                    "kill(q/$sig/, $pid_to_kill);");
                 $watchdog = system(1, $cmd);
             };
             if ($@ || ($watchdog <= 0)) {