Commit e99e9bac authored by Brad King's avatar Brad King
Browse files

BUG: Added missing zero-initialization of struct sigaction.

parent dfcd4f21
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment