From 9b2b2b5f1b463cb20f576aad903341dab5bf3373 Mon Sep 17 00:00:00 2001 From: Brad King Date: Tue, 1 Aug 2006 14:28:03 -0400 Subject: COMP: Use SA_RESTART only if it is defined for the current platform. This partially addresses bug#3556. --- Source/kwsys/ProcessUNIX.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Source/kwsys/ProcessUNIX.c b/Source/kwsys/ProcessUNIX.c index 03ecc26..fadc5f6 100644 --- a/Source/kwsys/ProcessUNIX.c +++ b/Source/kwsys/ProcessUNIX.c @@ -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)); -- cgit v0.12