diff options
author | Ben Noordhuis <info@bnoordhuis.nl> | 2019-05-23 12:15:27 +0300 |
---|---|---|
committer | Ben Noordhuis <info@bnoordhuis.nl> | 2019-05-23 12:20:31 +0300 |
commit | 6e796581fc7863c27722f6d076e2b2b4dac2912e (patch) | |
tree | 0344dc363a8324f8d3cb3ffbae2080a2077931c7 /src/node.cc | |
parent | 165916b1f3ec094b1694bd5a056c2fc5e56027c2 (diff) |
src: remove freebsd SA_RESETHAND workaround
This workaround should no longer be necessary with supported versions
of FreeSBD.
Originally introduced in commit b64983d77c ("src: reset signal handler
to SIG_DFL on FreeBSD") from March 2015.
Fixes: https://github.com/nodejs/node/issues/27515
PR-URL: https://github.com/nodejs/node/pull/27780
Refs: https://github.com/nodejs/node/pull/27246#discussion_r279636813
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Michaƫl Zasso <targos@protonmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/node.cc')
-rw-r--r-- | src/node.cc | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/src/node.cc b/src/node.cc index 7dccd7ce576..c8eeb4ccaa8 100644 --- a/src/node.cc +++ b/src/node.cc @@ -191,13 +191,6 @@ void WaitForInspectorDisconnect(Environment* env) { #ifdef __POSIX__ void SignalExit(int signo, siginfo_t* info, void* ucontext) { uv_tty_reset_mode(); -#ifdef __FreeBSD__ - // FreeBSD has a nasty bug, see RegisterSignalHandler for details - struct sigaction sa; - memset(&sa, 0, sizeof(sa)); - sa.sa_handler = SIG_DFL; - CHECK_EQ(sigaction(signo, &sa, nullptr), 0); -#endif raise(signo); } #endif // __POSIX__ @@ -480,12 +473,7 @@ void RegisterSignalHandler(int signal, struct sigaction sa; memset(&sa, 0, sizeof(sa)); sa.sa_sigaction = handler; -#ifndef __FreeBSD__ - // FreeBSD has a nasty bug with SA_RESETHAND reseting the SA_SIGINFO, that is - // in turn set for a libthr wrapper. This leads to a crash. - // Work around the issue by manually setting SIG_DFL in the signal handler sa.sa_flags = reset_handler ? SA_RESETHAND : 0; -#endif sigfillset(&sa.sa_mask); CHECK_EQ(sigaction(signal, &sa, nullptr), 0); } |