COMP: Use SA_RESTART only if it is defined for the current platform. This partially addresses bug#3556.

This commit is contained in:
Brad King 2006-08-01 14:28:03 -04:00
parent 1a7172acdf
commit 9b2b2b5f1b
1 changed files with 4 additions and 1 deletions

View File

@ -2201,7 +2201,10 @@ static int kwsysProcessesAdd(kwsysProcess* cp)
struct sigaction newSigChldAction;
memset(&newSigChldAction, 0, sizeof(struct sigaction));
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,
&kwsysProcessesOldSigChldAction) < 0) &&
(errno == EINTR));