From: Craig A. Berry Date: Fri, 16 Oct 2009 15:58:43 +0000 (-0500) Subject: Make the watchdog create a valid command for spawning. X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=9b7a5066c959acc331302e11abdc5e60a5cda5b4;p=p5sagit%2Fp5-mst-13.2.git 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). --- diff --git a/t/test.pl b/t/test.pl index 1c1a09d..7d1a90b 100644 --- a/t/test.pl +++ b/t/test.pl @@ -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');