diff options
author | Lennart Poettering <lennart@poettering.net> | 2011-02-09 12:12:30 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2011-02-09 12:12:30 +0100 |
commit | 0658666bacde7decbc362f0f589fe6aa5251faba (patch) | |
tree | 68810fe51916361bf655a2aa73680e52c83dfbce /src/manager.c | |
parent | be0396695bae9227ad69fcb61066bd84b3974e16 (diff) |
manager: if we receive SIGRTMIN+20/21 enable/disable showing of status on the console
Diffstat (limited to 'src/manager.c')
-rw-r--r-- | src/manager.c | 18 |
1 files changed, 17 insertions, 1 deletions
diff --git a/src/manager.c b/src/manager.c index 2714df1152..4a8408212a 100644 --- a/src/manager.c +++ b/src/manager.c @@ -174,6 +174,8 @@ static int manager_setup_signals(Manager *m) { SIGRTMIN+14, /* systemd: Immediate poweroff */ SIGRTMIN+15, /* systemd: Immediate reboot */ SIGRTMIN+16, /* systemd: Immediate kexec */ + SIGRTMIN+20, /* systemd: enable status messages */ + SIGRTMIN+21, /* systemd: disable status messages */ -1); assert_se(sigprocmask(SIG_SETMASK, &mask, NULL) == 0); @@ -2177,7 +2179,21 @@ static int manager_process_signal_fd(Manager *m) { break; } - log_warning("Got unhandled signal <%s>.", strna(signal_to_string(sfsi.ssi_signo))); + switch (sfsi.ssi_signo - SIGRTMIN) { + + case 20: + log_debug("Enabling showing of status."); + m->show_status = true; + break; + + case 21: + log_debug("Disabling showing of status."); + m->show_status = false; + break; + + default: + log_warning("Got unhandled signal <%s>.", strna(signal_to_string(sfsi.ssi_signo))); + } } } } |