summaryrefslogtreecommitdiff
path: root/src/main.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-05-22 01:46:08 +0200
committerLennart Poettering <lennart@poettering.net>2010-05-22 01:46:08 +0200
commit9a34ec5fbb4b55413dc9d610b636fe760d34ecd7 (patch)
tree75ca3c00d0954ad3c78dbb1c616d6fafd2b93ff0 /src/main.c
parente1ce2c2782015579f042d4d6963ed039333fb8c2 (diff)
execute: only reset those signals to the default we really need to reset to the default
Diffstat (limited to 'src/main.c')
-rw-r--r--src/main.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 95d2115230..5c2af042d9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -165,12 +165,7 @@ static void install_crash_handler(void) {
sa.sa_handler = crash;
sa.sa_flags = SA_NODEFER;
- assert_se(sigaction(SIGSEGV, &sa, NULL) == 0);
- assert_se(sigaction(SIGILL, &sa, NULL) == 0);
- assert_se(sigaction(SIGFPE, &sa, NULL) == 0);
- assert_se(sigaction(SIGBUS, &sa, NULL) == 0);
- assert_se(sigaction(SIGQUIT, &sa, NULL) == 0);
- assert_se(sigaction(SIGABRT, &sa, NULL) == 0);
+ sigaction_many(&sa, SIGNALS_CRASH_HANLDER, -1);
}
static int make_null_stdio(void) {
@@ -569,8 +564,7 @@ int main(int argc, char *argv[]) {
assert_se(reset_all_signal_handlers() == 0);
/* If we are init, we can block sigkill. Yay. */
- ignore_signal(SIGKILL);
- ignore_signal(SIGPIPE);
+ ignore_signals(SIGNALS_IGNORE, -1);
if (running_as != MANAGER_SESSION)
if (parse_proc_cmdline() < 0)