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
[perl5.git] / 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)) {