Skip to content

Commit 51a01c7

Browse files
committed
src: remove freebsd SA_RESETHAND workaround
This workaround should no longer be necessary with supported versions of FreeSBD. Originally introduced in commit b64983d ("src: reset signal handler to SIG_DFL on FreeBSD") from March 2015. Fixes: #27515 Refs: #27246 (comment) Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent 165916b commit 51a01c7

File tree

1 file changed

+0
-12
lines changed

1 file changed

+0
-12
lines changed

src/node.cc

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,6 @@ void WaitForInspectorDisconnect(Environment* env) {
191191
#ifdef __POSIX__
192192
void SignalExit(int signo, siginfo_t* info, void* ucontext) {
193193
uv_tty_reset_mode();
194-
#ifdef __FreeBSD__
195-
// FreeBSD has a nasty bug, see RegisterSignalHandler for details
196-
struct sigaction sa;
197-
memset(&sa, 0, sizeof(sa));
198-
sa.sa_handler = SIG_DFL;
199-
CHECK_EQ(sigaction(signo, &sa, nullptr), 0);
200-
#endif
201194
raise(signo);
202195
}
203196
#endif // __POSIX__
@@ -480,12 +473,7 @@ void RegisterSignalHandler(int signal,
480473
struct sigaction sa;
481474
memset(&sa, 0, sizeof(sa));
482475
sa.sa_sigaction = handler;
483-
#ifndef __FreeBSD__
484-
// FreeBSD has a nasty bug with SA_RESETHAND reseting the SA_SIGINFO, that is
485-
// in turn set for a libthr wrapper. This leads to a crash.
486-
// Work around the issue by manually setting SIG_DFL in the signal handler
487476
sa.sa_flags = reset_handler ? SA_RESETHAND : 0;
488-
#endif
489477
sigfillset(&sa.sa_mask);
490478
CHECK_EQ(sigaction(signal, &sa, nullptr), 0);
491479
}

0 commit comments

Comments
 (0)