[llvm-commits] [llvm] r81144 - /llvm/trunk/lib/System/Unix/Program.inc
Duncan Sands
baldrick at free.fr
Sun Sep 6 22:58:26 PDT 2009
Author: baldrick
Date: Mon Sep 7 00:58:25 2009
New Revision: 81144
URL: http://llvm.org/viewvc/llvm-project?rev=81144&view=rev
Log:
Using a signal handler that does nothing should be
equivalent to SIG_IGN.
Modified:
llvm/trunk/lib/System/Unix/Program.inc
Modified: llvm/trunk/lib/System/Unix/Program.inc
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/System/Unix/Program.inc?rev=81144&r1=81143&r2=81144&view=diff
==============================================================================
--- llvm/trunk/lib/System/Unix/Program.inc (original)
+++ llvm/trunk/lib/System/Unix/Program.inc Mon Sep 7 00:58:25 2009
@@ -116,9 +116,6 @@
return false;
}
-static void TimeOutHandler(int Sig) {
-}
-
static void SetMemoryLimits (unsigned size)
{
#if HAVE_SYS_RESOURCE_H
@@ -231,10 +228,9 @@
// Install a timeout handler.
if (secondsToWait) {
- Act.sa_sigaction = 0;
- Act.sa_handler = TimeOutHandler;
+ memset(&Act, 0, sizeof(Act));
+ Act.sa_handler = SIG_IGN;
sigemptyset(&Act.sa_mask);
- Act.sa_flags = 0;
sigaction(SIGALRM, &Act, &Old);
alarm(secondsToWait);
}
More information about the llvm-commits
mailing list