testbot/TestAgent: Make sure we don't overflow alarm()'s 32-bit limit.
Francois Gouget
fgouget at codeweavers.com
Thu May 15 08:55:45 CDT 2014
---
testbot/lib/WineTestBot/TestAgent.pm | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/testbot/lib/WineTestBot/TestAgent.pm b/testbot/lib/WineTestBot/TestAgent.pm
index 3c84d49..1acb0cd 100644
--- a/testbot/lib/WineTestBot/TestAgent.pm
+++ b/testbot/lib/WineTestBot/TestAgent.pm
@@ -174,7 +174,8 @@ sub _SetAlarm($)
{
my $Timeout = $self->{deadline} - time();
die "timeout" if ($Timeout <= 0);
- alarm($Timeout);
+ # alarm() has a 32-bit limit, even on 64-bit systems
+ alarm($Timeout <= 0xffffffff ? $Timeout : 0xffffffff);
}
}
--
2.0.0.rc0
More information about the wine-patches
mailing list