BUG: Added missing zero-initialization of struct sigaction.
This commit is contained in:
parent
dfcd4f2154
commit
e99e9baca4
|
@ -285,6 +285,7 @@ void kwsysProcess_Execute(kwsysProcess* cp)
|
||||||
|
|
||||||
/* We want no special handling of SIGCHLD. Repeat call until it is
|
/* We want no special handling of SIGCHLD. Repeat call until it is
|
||||||
not interrupted. */
|
not interrupted. */
|
||||||
|
memset(&newSigChldAction, 0, sizeof(struct sigaction));
|
||||||
newSigChldAction.sa_handler = SIG_DFL;
|
newSigChldAction.sa_handler = SIG_DFL;
|
||||||
while((sigaction(SIGCHLD, &newSigChldAction, &cp->OldSigChldAction) < 0) &&
|
while((sigaction(SIGCHLD, &newSigChldAction, &cp->OldSigChldAction) < 0) &&
|
||||||
(errno == EINTR));
|
(errno == EINTR));
|
||||||
|
@ -901,6 +902,7 @@ static void kwsysProcessChildErrorExit(kwsysProcess* cp)
|
||||||
static void kwsysProcessRestoreDefaultSignalHandlers()
|
static void kwsysProcessRestoreDefaultSignalHandlers()
|
||||||
{
|
{
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
|
memset(&act, 0, sizeof(struct sigaction));
|
||||||
act.sa_handler = SIG_DFL;
|
act.sa_handler = SIG_DFL;
|
||||||
#ifdef SIGHUP
|
#ifdef SIGHUP
|
||||||
sigaction(SIGHUP, &act, 0);
|
sigaction(SIGHUP, &act, 0);
|
||||||
|
|
Loading…
Reference in New Issue