mirror of
https://gitlab.com/xonotic/xonotic
synced 2025-02-03 04:01:53 +00:00
fix timeouts
This commit is contained in:
parent
3a27e02f3a
commit
75840126be
@ -182,12 +182,10 @@ sub q3map2(@)
|
||||
defined(my $pid = fork())
|
||||
or die "fork: $!";
|
||||
if($pid) # parent
|
||||
{
|
||||
if($timeout)
|
||||
{
|
||||
local $SIG{ALRM} = sub { kill $pid; };
|
||||
alarm $timeout;
|
||||
}
|
||||
alarm $timeout
|
||||
if $timeout;
|
||||
if(waitpid $pid, 0 != $pid)
|
||||
{
|
||||
die "waitpid: did not return our child process $pid: $!";
|
||||
|
Loading…
Reference in New Issue
Block a user