From: Rudolf Polzer Date: Mon, 19 Jul 2010 06:34:34 +0000 (+0200) Subject: fix timeouts X-Git-Tag: xonotic-v0.1.0preview~365 X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=commitdiff_plain;h=75840126be47555c21064ffd8fbfdee34da5c3c5 fix timeouts --- diff --git a/misc/tools/xonotic-map-compiler b/misc/tools/xonotic-map-compiler index bfc6593b..9ae0cec1 100755 --- a/misc/tools/xonotic-map-compiler +++ b/misc/tools/xonotic-map-compiler @@ -183,11 +183,9 @@ sub q3map2(@) or die "fork: $!"; if($pid) # parent { - if($timeout) - { - local $SIG{ALRM} = sub { kill $pid; }; - alarm $timeout; - } + local $SIG{ALRM} = sub { kill $pid; }; + alarm $timeout + if $timeout; if(waitpid $pid, 0 != $pid) { die "waitpid: did not return our child process $pid: $!";