diff options
author | Colin Walters <walters@verbum.org> | 2013-01-18 14:35:27 -0500 |
---|---|---|
committer | Dan Winship <danw@gnome.org> | 2013-01-22 12:49:48 -0500 |
commit | ae627737d5f370b3584fb07bf8f041226611148b (patch) | |
tree | 84740fa94aa61eae182c8a801fe5dcfbd059d8f7 /src/main.c | |
parent | e7caad20c9b30594fc0f700e98a6576e577a764b (diff) | |
download | NetworkManager-ae627737d5f370b3584fb07bf8f041226611148b.tar.gz |
Remove SIGSEGV/SIGFPE etc. handling
Modern operating systems come with systemwide "crash catching"
facilities; for example, the Linux kernel can now pipe core dumps out
to userspace, and programs like "systemd-coredump" and "abrt" record
these.
In this model, it's actively counterproductive for individual
processes to catch SIGSEGV because:
1) Trying to unwind from inside the process after arbitrary
corruption is destined to fail.
2) It hides the fact that a crash happened at all - my OS test
framework wants to know if any process crashed, and I don't
want to guess by running regexps against /var/log/Xorg.0.log
or whatever.
Signed-off-by: Colin Walters <walters@verbum.org>
https://bugzilla.gnome.org/show_bug.cgi?id=692032
Diffstat (limited to 'src/main.c')
-rw-r--r-- | src/main.c | 23 |
1 files changed, 0 insertions, 23 deletions
diff --git a/src/main.c b/src/main.c index b074bd8a8e..7288c3d367 100644 --- a/src/main.c +++ b/src/main.c @@ -88,22 +88,6 @@ signal_handling_thread (void *arg) sigwait (&signal_set, &signo); switch (signo) { - case SIGSEGV: - case SIGBUS: - case SIGILL: - case SIGABRT: - case SIGQUIT: - nm_log_warn (LOGD_CORE, "caught signal %d. Generating backtrace...", signo); - nm_logging_backtrace (); - exit (1); - break; - case SIGFPE: - case SIGPIPE: - nm_log_warn (LOGD_CORE, "caught signal %d, shutting down abnormally. Generating backtrace...", signo); - nm_logging_backtrace (); - quit_early = TRUE; /* for quitting before entering the main loop */ - g_main_loop_quit (main_loop); - break; case SIGINT: case SIGTERM: nm_log_info (LOGD_CORE, "caught signal %d, shutting down normally.", signo); @@ -142,13 +126,6 @@ setup_signals (void) sigemptyset (&signal_set); sigaddset (&signal_set, SIGHUP); sigaddset (&signal_set, SIGINT); - sigaddset (&signal_set, SIGQUIT); - sigaddset (&signal_set, SIGILL); - sigaddset (&signal_set, SIGABRT); - sigaddset (&signal_set, SIGFPE); - sigaddset (&signal_set, SIGBUS); - sigaddset (&signal_set, SIGSEGV); - sigaddset (&signal_set, SIGPIPE); sigaddset (&signal_set, SIGTERM); sigaddset (&signal_set, SIGUSR1); |