more timeout fixing

This commit is contained in:
Rudolf Polzer 2010-07-19 14:39:21 +02:00
parent 9ac2d431c5
commit eeb4e981e7

View File

@ -183,7 +183,7 @@ sub q3map2(@)
or die "fork: $!";
if($pid) # parent
{
local $SIG{ALRM} = sub { kill $pid; };
local $SIG{ALRM} = sub { warn "SIGALRM caught\n"; kill $pid; };
alarm $timeout
if $timeout;
if(waitpid($pid, 0) != $pid)
@ -191,7 +191,7 @@ sub q3map2(@)
die "waitpid: did not return our child process $pid: $!";
}
alarm 0;
return $? == 0;
return ($? == 0);
}
else # child
{