more timeout fixing
authorRudolf Polzer <divverent@alientrap.org>
Mon, 19 Jul 2010 12:39:21 +0000 (14:39 +0200)
committerRudolf Polzer <divverent@alientrap.org>
Mon, 19 Jul 2010 12:39:21 +0000 (14:39 +0200)
misc/tools/xonotic-map-compiler

index 4f8c83871edcfbb6ee6eab9ca84d9384afcc289c..7a114e5223f045686a15a695e5fbdee2f064bbf6 100755 (executable)
@@ -183,7 +183,7 @@ sub q3map2(@)
                or die "fork: $!";
        if($pid) # parent
        {
                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)
                alarm $timeout
                        if $timeout;
                if(waitpid($pid, 0) != $pid)
@@ -191,7 +191,7 @@ sub q3map2(@)
                        die "waitpid: did not return our child process $pid: $!";
                }
                alarm 0;
                        die "waitpid: did not return our child process $pid: $!";
                }
                alarm 0;
-               return $? == 0;
+               return ($? == 0);
        }
        else # child
        {
        }
        else # child
        {