diff options
author | Brad King <brad.king@kitware.com> | 2003-08-05 15:34:39 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2003-08-05 15:34:39 (GMT) |
commit | e99e9baca48dd87b2820ce46e0de241542a56796 (patch) | |
tree | 0c5b161c8fe637eec30f2567eba10515d0319cb5 | |
parent | dfcd4f21541f2981f53ca6f1ae15da2f88a223f7 (diff) | |
download | CMake-e99e9baca48dd87b2820ce46e0de241542a56796.zip CMake-e99e9baca48dd87b2820ce46e0de241542a56796.tar.gz CMake-e99e9baca48dd87b2820ce46e0de241542a56796.tar.bz2 |
BUG: Added missing zero-initialization of struct sigaction.
-rw-r--r-- | Source/kwsys/ProcessUNIX.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 3f51613..bf433f3 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -285,6 +285,7 @@ void kwsysProcess_Execute(kwsysProcess* cp) /* We want no special handling of SIGCHLD. Repeat call until it is not interrupted. */ + memset(&newSigChldAction, 0, sizeof(struct sigaction)); newSigChldAction.sa_handler = SIG_DFL; while((sigaction(SIGCHLD, &newSigChldAction, &cp->OldSigChldAction) < 0) && (errno == EINTR)); @@ -901,6 +902,7 @@ static void kwsysProcessChildErrorExit(kwsysProcess* cp) static void kwsysProcessRestoreDefaultSignalHandlers() { struct sigaction act; + memset(&act, 0, sizeof(struct sigaction)); act.sa_handler = SIG_DFL; #ifdef SIGHUP sigaction(SIGHUP, &act, 0); |