diff options
author | Brad King <brad.king@kitware.com> | 2018-01-11 20:32:46 +0000 |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2018-01-11 15:33:03 -0500 |
commit | 4cf08c96f8e6cba3af3b73d0e7317e2d1547a4c0 (patch) | |
tree | cbb0a579e295f3b99ab17515785b0e6ac3aab72e /Utilities | |
parent | ae7c7b6db5d6765768e95485b2db1a1b18cfbded (diff) | |
parent | b5e21d7d2ed3168c9efcbc25c67d2c330d76d4d0 (diff) | |
download | cmake-4cf08c96f8e6cba3af3b73d0e7317e2d1547a4c0.tar.gz |
Merge topic 'ctest-libuv'
b5e21d7d CTest: Re-implement test process handling using libuv
fcebff75 cmProcess: Use explicit enum for process exit exception
3dd2edf4 cmProcess: Use explicit enum for process state
5238e6db cmProcess: Remove unused ReportStatus method
c13b68e6 cmCTestRunTest: Modernize constructor and destructor decls
4d6b0903 cmCTestRunTest: Drop unused members
05da65bc cmCTestMultiProcessHandler: Factor out duplicate test finish logic
dd945345 cmCTestMultiProcessHandler: Add helper to make libuv use SA_RESTART
...
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !1455
Diffstat (limited to 'Utilities')
-rw-r--r-- | Utilities/cmlibuv/src/unix/signal.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Utilities/cmlibuv/src/unix/signal.c b/Utilities/cmlibuv/src/unix/signal.c index cb09ead50a..3759778011 100644 --- a/Utilities/cmlibuv/src/unix/signal.c +++ b/Utilities/cmlibuv/src/unix/signal.c @@ -28,6 +28,9 @@ #include <string.h> #include <unistd.h> +#ifndef SA_RESTART +# define SA_RESTART 0 +#endif typedef struct { uv_signal_t* handle; @@ -216,7 +219,9 @@ static int uv__signal_register_handler(int signum, int oneshot) { if (sigfillset(&sa.sa_mask)) abort(); sa.sa_handler = uv__signal_handler; - sa.sa_flags = oneshot ? SA_RESETHAND : 0; + sa.sa_flags = SA_RESTART; + if (oneshot) + sa.sa_flags |= SA_RESETHAND; /* XXX save old action so we can restore it later on? */ if (sigaction(signum, &sa, NULL)) |