X-Git-Url: https://git.xonotic.org/?a=blobdiff_plain;ds=sidebyside;f=misc%2Ftools%2Fxonotic-map-compiler;h=596a511ca259f5d3774de7678cde8a10cc181b34;hb=ae02c9f56ecdfdb3dc7aa1064fbdfa84674dbf62;hp=9ae0cec16434d1d2b78f0a38acb0a449c3663a05;hpb=75840126be47555c21064ffd8fbfdee34da5c3c5;p=xonotic%2Fxonotic.git diff --git a/misc/tools/xonotic-map-compiler b/misc/tools/xonotic-map-compiler index 9ae0cec1..596a511c 100755 --- a/misc/tools/xonotic-map-compiler +++ b/misc/tools/xonotic-map-compiler @@ -183,14 +183,15 @@ sub q3map2(@) or die "fork: $!"; if($pid) # parent { - local $SIG{ALRM} = sub { kill $pid; }; + local $SIG{ALRM} = sub { warn "SIGALRM caught\n"; kill TERM => $pid; }; alarm $timeout if $timeout; - if(waitpid $pid, 0 != $pid) + if(waitpid($pid, 0) != $pid) { die "waitpid: did not return our child process $pid: $!"; } - return !$?; + alarm 0; + return ($? == 0); } else # child {