diff options
author | Igor Sysoev <igor@sysoev.ru> | 2017-08-24 17:43:32 +0300 |
---|---|---|
committer | Igor Sysoev <igor@sysoev.ru> | 2017-08-24 17:43:32 +0300 |
commit | b84aa64dcbfb92d31cef10f2f45025a67f2418e4 (patch) | |
tree | bd7509540538801bdde233b24c0a130fbd6d757a /src/nxt_signal.c | |
parent | 8b4b52ae3b3c9400b3d7040a591203a0c1b74ec3 (diff) | |
download | unit-b84aa64dcbfb92d31cef10f2f45025a67f2418e4.tar.gz unit-b84aa64dcbfb92d31cef10f2f45025a67f2418e4.tar.bz2 |
Removed configure option --no-threads.
Diffstat (limited to 'src/nxt_signal.c')
-rw-r--r-- | src/nxt_signal.c | 40 |
1 files changed, 1 insertions, 39 deletions
diff --git a/src/nxt_signal.c b/src/nxt_signal.c index 3ccd0774..0ab1ba99 100644 --- a/src/nxt_signal.c +++ b/src/nxt_signal.c @@ -23,6 +23,7 @@ static nxt_int_t nxt_signal_action(int signo, void (*handler)(int)); +static void nxt_signal_thread(void *data); nxt_event_signals_t * @@ -106,11 +107,6 @@ nxt_signal_handler(int signo) } -#if (NXT_THREADS) - -static void nxt_signal_thread(void *data); - - nxt_int_t nxt_signal_thread_start(nxt_event_engine_t *engine) { @@ -194,37 +190,3 @@ nxt_signal_thread_stop(nxt_event_engine_t *engine) nxt_thread_cancel(thread); nxt_thread_wait(thread); } - - -#else /* !(NXT_THREADS) */ - - -nxt_int_t -nxt_signal_handlers_start(nxt_event_engine_t *engine) -{ - const nxt_sig_event_t *sigev; - - for (sigev = engine->signals->sigev; sigev->signo != 0; sigev++) { - if (nxt_signal_action(sigev->signo, nxt_signal_handler) != NXT_OK) { - return NXT_ERROR; - } - } - - if (sigprocmask(SIG_UNBLOCK, &engine->signals->sigmask, NULL) != 0) { - nxt_main_log_alert("sigprocmask(SIG_UNBLOCK) failed %E", nxt_errno); - return NXT_ERROR; - } - - return NXT_OK; -} - - -void -nxt_signal_handlers_stop(nxt_event_engine_t *engine) -{ - if (sigprocmask(SIG_BLOCK, &engine->signals->sigmask, NULL) != 0) { - nxt_main_log_alert("sigprocmask(SIG_BLOCK) failed %E", nxt_errno); - } -} - -#endif |