X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler;h=9ae0cec16434d1d2b78f0a38acb0a449c3663a05;hp=bfc6593b5f8a665646a6ee9c0849b73c27f9efec;hb=75840126be47555c21064ffd8fbfdee34da5c3c5;hpb=3a27e02f3a7ffcce4da1955646b9239109dff481 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: $!";