summaryrefslogtreecommitdiffstats
path: root/llvm/lib
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
commitcd32ecf44f625294d94c1220ab115b2ed26aa916 (patch)
tree474daab70987b4726f629b8f1d506933f77a059c /llvm/lib
parente73d5ca9a8fff1af6432e8dafdf457e4e29696b0 (diff)
downloadbcm5719-llvm-cd32ecf44f625294d94c1220ab115b2ed26aa916.tar.gz
bcm5719-llvm-cd32ecf44f625294d94c1220ab115b2ed26aa916.zip
Using a signal handler that does nothing should be
equivalent to SIG_IGN. llvm-svn: 81144
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/System/Unix/Program.inc8
1 files changed, 2 insertions, 6 deletions
diff --git a/llvm/lib/System/Unix/Program.inc b/llvm/lib/System/Unix/Program.inc
index adf7390f9fb..fca92923825 100644
--- a/llvm/lib/System/Unix/Program.inc
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud