mirror of
https://github.com/systemd/systemd.git
synced 2025-02-23 13:57:33 +03:00
manager: reexecute on SIGTERM, for compat with sysv
This commit is contained in:
parent
a0fcc5f6ce
commit
e11dc4a213
@ -1765,9 +1765,15 @@ static int manager_process_signal_fd(Manager *m) {
|
|||||||
sigchld = true;
|
sigchld = true;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case SIGINT:
|
|
||||||
case SIGTERM:
|
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) {
|
if (m->running_as == MANAGER_INIT) {
|
||||||
manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET);
|
manager_start_target(m, SPECIAL_CTRL_ALT_DEL_TARGET);
|
||||||
break;
|
break;
|
||||||
@ -1777,7 +1783,6 @@ static int manager_process_signal_fd(Manager *m) {
|
|||||||
return 0;
|
return 0;
|
||||||
|
|
||||||
case SIGWINCH:
|
case SIGWINCH:
|
||||||
|
|
||||||
if (m->running_as == MANAGER_INIT)
|
if (m->running_as == MANAGER_INIT)
|
||||||
manager_start_target(m, SPECIAL_KBREQUEST_TARGET);
|
manager_start_target(m, SPECIAL_KBREQUEST_TARGET);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user