X-Git-Url: https://git.xonotic.org/?p=xonotic%2Fxonotic.git;a=blobdiff_plain;f=misc%2Ftools%2Fxonotic-map-compiler;h=7a114e5223f045686a15a695e5fbdee2f064bbf6;hp=9ae0cec16434d1d2b78f0a38acb0a449c3663a05;hb=eeb4e981e777965ddc1791300419030b1187ddb8;hpb=75840126be47555c21064ffd8fbfdee34da5c3c5 diff --git a/misc/tools/xonotic-map-compiler b/misc/tools/xonotic-map-compiler index 9ae0cec1..7a114e52 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 $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 {