diff options
author | Lennart Poettering <lennart@poettering.net> | 2010-04-24 00:02:12 +0200 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2010-04-24 00:02:12 +0200 |
commit | e11dc4a213876143e7111dc0afee72a5cecd3b12 (patch) | |
tree | a09fb74594221b3433e283e5e86496cb68060bae | |
parent | a0fcc5f6ce46ae69649f42e844249c54aa1e7b2e (diff) |
manager: reexecute on SIGTERM, for compat with sysv
-rw-r--r-- | manager.c | 9 |
1 files changed, 7 insertions, 2 deletions
@@ -1765,9 +1765,15 @@ static int manager_process_signal_fd(Manager *m) { sigchld = true; break; - case SIGINT: case SIGTERM: + if (m->running_as == MANAGER_INIT) + m->exit_code = MANAGER_REEXECUTE; + else + m->exit_code = MANAGER_EXIT; + return 0; + + case SIGINT: if (m->running_as == MANAGER_INIT) { manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET); break; @@ -1777,7 +1783,6 @@ static int manager_process_signal_fd(Manager *m) { return 0; case SIGWINCH: - if (m->running_as == MANAGER_INIT) manager_start_target(m, SPECIAL_KBREQUEST_TARGET); |