X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=elogind.git;a=blobdiff_plain;f=execute.c;h=5264b5009e73c919162d06c6e614e637f17f0337;hp=065296bafd53bde1fb750e92b8ab50aad2372dc0;hb=90a13a44cbae440d973144706aec039c7dab2e38;hpb=80876c20f64f87765242bc35895977ab6a855729 diff --git a/execute.c b/execute.c index 065296baf..5264b5009 100644 --- a/execute.c +++ b/execute.c @@ -681,6 +681,8 @@ int exec_spawn(ExecCommand *command, /* child */ + reset_all_signal_handlers(); + if (sigemptyset(&ss) < 0 || sigprocmask(SIG_SETMASK, &ss, NULL) < 0) { r = EXIT_SIGNAL_MASK; @@ -1355,7 +1357,11 @@ int exec_command_set(ExecCommand *c, const char *path, ...) { } const char* exit_status_to_string(ExitStatus status) { - switch (status) { + + /* We cast to int here, so that -Wenum doesn't complain that + * EXIT_SUCCESS/EXIT_FAILURE aren't in the enum */ + + switch ((int) status) { case EXIT_SUCCESS: return "SUCCESS";