summaryrefslogtreecommitdiff
path: root/lib/System
diff options
context:
space:
mode:
authorDuncan Sands <baldrick@free.fr>2009-09-07 05:58:25 +0000
committerDuncan Sands <baldrick@free.fr>2009-09-07 05:58:25 +0000
commit3429c5e153d5315df7db1fcfb0a6a95cbfd48fba (patch)
tree2648c609d3ec5155a66e43ddbbe368336f4374e8 /lib/System
parent7b26b581cf3c20f9943c904e44ee5ec6d77f5aa2 (diff)
downloadllvm-3429c5e153d5315df7db1fcfb0a6a95cbfd48fba.tar.gz
llvm-3429c5e153d5315df7db1fcfb0a6a95cbfd48fba.tar.bz2
llvm-3429c5e153d5315df7db1fcfb0a6a95cbfd48fba.tar.xz
Using a signal handler that does nothing should be
equivalent to SIG_IGN. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@81144 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r--lib/System/Unix/Program.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc
index adf7390f9f..fca9292382 100644
--- a/lib/System/Unix/Program.inc
+++ b/lib/System/Unix/Program.inc
@@ -116,9 +116,6 @@ static bool RedirectIO(const Path *Path, int FD, std::string* ErrMsg) {
return false;
}
-static void TimeOutHandler(int Sig) {
-}
-
static void SetMemoryLimits (unsigned size)
{
#if HAVE_SYS_RESOURCE_H
@@ -231,10 +228,9 @@ Program::Wait(unsigned secondsToWait,
// 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);
}