summaryrefslogtreecommitdiff
path: root/src/systemctl/systemctl.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/systemctl/systemctl.c')
-rw-r--r--src/systemctl/systemctl.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/systemctl/systemctl.c b/src/systemctl/systemctl.c
index a7b8e54a9c..5075e4e176 100644
--- a/src/systemctl/systemctl.c
+++ b/src/systemctl/systemctl.c
@@ -5189,6 +5189,9 @@ static int enable_sysv_units(const char *verb, char **args) {
else if (pid == 0) {
/* Child */
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
+
execv(argv[0], (char**) argv);
log_error("Failed to execute %s: %m", argv[0]);
_exit(EXIT_FAILURE);
@@ -5854,6 +5857,9 @@ static int run_editor(char **paths) {
unsigned i = 1;
size_t argc;
+ (void) reset_all_signal_handlers();
+ (void) reset_signal_mask();
+
argc = strv_length(paths)/2 + 1;
args = newa(const char*, argc + 1);
@@ -5879,7 +5885,7 @@ static int run_editor(char **paths) {
execvp(editor, (char* const*) args);
}
- FOREACH_STRING(p, "nano", "vim", "vi") {
+ FOREACH_STRING(p, "editor", "nano", "vim", "vi") {
args[0] = p;
execvp(p, (char* const*) args);
/* We do not fail if the editor doesn't exist