die "fork() failed: $!" unless defined $forked;
if ( $forked == 0 ) { # child
sleep $time_to_wait;
- kill(9, $pid);
+ kill(SIGKILL, $pid);
exit $time_to_wait;
}
}
$got =~ s/\r//g;
$got =~ s/^( )*//g;
chomp $got;
- $got=trim($got);
+ $got=trim($got);
if( $got ne ""){
if (!($enable_coverage and $got=~ /^profiling:/)){
push @got, "$got";
}
# Push delayed commands on empty lines
- unless ($line =~ m/^(.)\s*(.*)$/) {
+ unless ($line =~ m/^(.).(.*)$/) {
if (defined($cmd{'cmd'})) {
exec_cmd(\%cmd);
%cmd = ();
} else {
die "[TESH/CRITICAL] parse error: $line\n";
}
+ if($forked){
+ kill(SIGKILL, $forked);
+ $timeout=0;
+ }
+
}
if($forked){
- kill(9, $forked);
+ kill(SIGKILL, $forked);
$timeout=0;
}