Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions src/libmain/shared.cc
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,15 @@ void initNix(bool loadConfig)
act.sa_handler = sigHandler;
if (sigaction(SIGUSR1, &act, 0))
throw SysError("handling SIGUSR1");

/* Reset SIGQUIT to its default disposition. In particular, this
unregisters any crash handler installed by `sentry_init()`
(which runs before us): SIGQUIT is a user-initiated "quit with
core dump" action (e.g. Ctrl-\ at a terminal), not a crash, so
it should not be reported. */
act.sa_handler = SIG_DFL;
if (sigaction(SIGQUIT, &act, 0))
throw SysError("handling SIGQUIT");
#endif

#ifdef __APPLE__
Expand All @@ -198,8 +207,6 @@ void initNix(bool loadConfig)
throw SysError("handling SIGHUP");
if (sigaction(SIGPIPE, &act, 0))
throw SysError("handling SIGPIPE");
if (sigaction(SIGQUIT, &act, 0))
throw SysError("handling SIGQUIT");
if (sigaction(SIGTRAP, &act, 0))
throw SysError("handling SIGTRAP");
#endif
Expand Down
Loading