COMP: Use SA_RESTART only if it is defined for the current platform. This partially addresses bug#3556.
This commit is contained in:
parent
1a7172acdf
commit
9b2b2b5f1b
|
@ -2201,7 +2201,10 @@ static int kwsysProcessesAdd(kwsysProcess* cp)
|
||||||
struct sigaction newSigChldAction;
|
struct sigaction newSigChldAction;
|
||||||
memset(&newSigChldAction, 0, sizeof(struct sigaction));
|
memset(&newSigChldAction, 0, sizeof(struct sigaction));
|
||||||
newSigChldAction.sa_sigaction = kwsysProcessesSignalHandler;
|
newSigChldAction.sa_sigaction = kwsysProcessesSignalHandler;
|
||||||
newSigChldAction.sa_flags = SA_NOCLDSTOP | SA_RESTART | SA_SIGINFO;
|
newSigChldAction.sa_flags = SA_NOCLDSTOP | SA_SIGINFO;
|
||||||
|
#ifdef SA_RESTART
|
||||||
|
newSigChldAction.sa_flags |= SA_RESTART;
|
||||||
|
#endif
|
||||||
while((sigaction(SIGCHLD, &newSigChldAction,
|
while((sigaction(SIGCHLD, &newSigChldAction,
|
||||||
&kwsysProcessesOldSigChldAction) < 0) &&
|
&kwsysProcessesOldSigChldAction) < 0) &&
|
||||||
(errno == EINTR));
|
(errno == EINTR));
|
||||||
|
|
Loading…
Reference in New Issue