summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-08-01 18:28:03 (GMT)
committerBrad King <brad.king@kitware.com>2006-08-01 18:28:03 (GMT)
commit9b2b2b5f1b463cb20f576aad903341dab5bf3373 (patch)
tree29e8ba4d99374008b31070534b3d3995ab7254af /Source
parent1a7172acdf6595036063cc81656dfe11709a1105 (diff)
downloadCMake-9b2b2b5f1b463cb20f576aad903341dab5bf3373.zip
CMake-9b2b2b5f1b463cb20f576aad903341dab5bf3373.tar.gz
CMake-9b2b2b5f1b463cb20f576aad903341dab5bf3373.tar.bz2
COMP: Use SA_RESTART only if it is defined for the current platform. This partially addresses bug#3556.
Diffstat (limited to 'Source')
-rw-r--r--Source/kwsys/ProcessUNIX.c5
1 files changed, 4 insertions, 1 deletions
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));