diff options
author | Craig A. Berry <craigberry@mac.com> | 2009-10-16 10:58:43 -0500 |
---|---|---|
committer | Craig A. Berry <craigberry@mac.com> | 2009-10-16 10:58:43 -0500 |
commit | 9b7a5066c959acc331302e11abdc5e60a5cda5b4 (patch) | |
tree | f047be05b5bd5b1d0d28a2ade62d049104948b25 /t | |
parent | c7cffa0b862541c21ec66e4efd2d80e4f0a2f142 (diff) | |
download | perl-9b7a5066c959acc331302e11abdc5e60a5cda5b4.tar.gz |
Make the watchdog create a valid command for spawning.
It was inserting a newline in the command string, which
causes a syntax error (at least on VMS).
Diffstat (limited to 't')
-rw-r--r-- | t/test.pl | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -832,10 +832,10 @@ sub watchdog ($) _diag("Watchdog warning: $_[0]"); }; my $sig = $^O eq 'VMS' ? 'TERM' : 'KILL'; - $watchdog = system(1, which_perl(), '-e', - "sleep($timeout);" . - "warn('# $timeout_msg\n');" . + my $cmd = _create_runperl( prog => "sleep($timeout);" . + "warn qq/# $timeout_msg" . '\n/;' . "kill($sig, $pid_to_kill);"); + $watchdog = system(1, $cmd); }; if ($@ || ($watchdog <= 0)) { _diag('Failed to start watchdog'); |