diff options
author | Duncan Sands <baldrick@free.fr> | 2010-07-14 14:32:33 +0000 |
---|---|---|
committer | Duncan Sands <baldrick@free.fr> | 2010-07-14 14:32:33 +0000 |
commit | 3dc7224379d87c42b1c1b4fa040dd5b2d7ae4bba (patch) | |
tree | 7e03b7ba6d4641fa36eb4a01023944359e06d353 /lib/System | |
parent | 54cc0e12dadd710e1b27d69c47ba30457e621d51 (diff) | |
download | external_llvm-3dc7224379d87c42b1c1b4fa040dd5b2d7ae4bba.zip external_llvm-3dc7224379d87c42b1c1b4fa040dd5b2d7ae4bba.tar.gz external_llvm-3dc7224379d87c42b1c1b4fa040dd5b2d7ae4bba.tar.bz2 |
Rather than using an ifdef on the target to zero out fields,
just use memset to zero the entire struct.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108330 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/System')
-rw-r--r-- | lib/System/Unix/Program.inc | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/lib/System/Unix/Program.inc b/lib/System/Unix/Program.inc index 67018de..0209f5a 100644 --- a/lib/System/Unix/Program.inc +++ b/lib/System/Unix/Program.inc @@ -310,12 +310,9 @@ Program::Wait(unsigned secondsToWait, // fact of having a handler at all causes the wait below to return with EINTR, // unlike if we used SIG_IGN. if (secondsToWait) { -#if !defined(__HAIKU__) && !defined(__minix) - Act.sa_sigaction = 0; -#endif + memset(&Act, 0, sizeof(Act)); Act.sa_handler = TimeOutHandler; sigemptyset(&Act.sa_mask); - Act.sa_flags = 0; sigaction(SIGALRM, &Act, &Old); alarm(secondsToWait); } |