From 75840126be47555c21064ffd8fbfdee34da5c3c5 Mon Sep 17 00:00:00 2001 From: Rudolf Polzer Date: Mon, 19 Jul 2010 08:34:34 +0200 Subject: [PATCH] fix timeouts --- misc/tools/xonotic-map-compiler | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) 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: $!"; -- 2.39.2