diff options
author | Anita Zhang <anitzhang@gmail.com> | 2018-09-19 12:03:01 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2018-09-26 16:14:29 +0200 |
commit | c87700a1335f489be31cd3549927da68b5638819 (patch) | |
tree | ec3a2419cbb0f4b6fb34efcfb28fbcf2f7d41186 /src/core/dbus-kill.c | |
parent | ee8d493cbd7e7bd6d2230bbbb604dcdf02800139 (diff) | |
download | systemd-c87700a1335f489be31cd3549927da68b5638819.tar.gz |
Make Watchdog Signal Configurable
Allows configuring the watchdog signal (with a default of SIGABRT).
This allows an alternative to SIGABRT when coredumps are not desirable.
Appropriate references to SIGABRT or aborting were renamed to reflect
more liberal watchdog signals.
Closes #8658
Diffstat (limited to 'src/core/dbus-kill.c')
-rw-r--r-- | src/core/dbus-kill.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/core/dbus-kill.c b/src/core/dbus-kill.c index 3e2a7694a7..e2b3a0d517 100644 --- a/src/core/dbus-kill.c +++ b/src/core/dbus-kill.c @@ -15,12 +15,14 @@ const sd_bus_vtable bus_kill_vtable[] = { SD_BUS_PROPERTY("FinalKillSignal", "i", bus_property_get_int, offsetof(KillContext, final_kill_signal), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("SendSIGKILL", "b", bus_property_get_bool, offsetof(KillContext, send_sigkill), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_PROPERTY("SendSIGHUP", "b", bus_property_get_bool, offsetof(KillContext, send_sighup), SD_BUS_VTABLE_PROPERTY_CONST), + SD_BUS_PROPERTY("WatchdogSignal", "i", bus_property_get_int, offsetof(KillContext, watchdog_signal), SD_BUS_VTABLE_PROPERTY_CONST), SD_BUS_VTABLE_END }; static BUS_DEFINE_SET_TRANSIENT_PARSE(kill_mode, KillMode, kill_mode_from_string); static BUS_DEFINE_SET_TRANSIENT_TO_STRING(kill_signal, "i", int32_t, int, "%" PRIi32, signal_to_string_with_check); static BUS_DEFINE_SET_TRANSIENT_TO_STRING(final_kill_signal, "i", int32_t, int, "%" PRIi32, signal_to_string_with_check); +static BUS_DEFINE_SET_TRANSIENT_TO_STRING(watchdog_signal, "i", int32_t, int, "%" PRIi32, signal_to_string_with_check); int bus_kill_context_set_transient_property( Unit *u, @@ -52,5 +54,8 @@ int bus_kill_context_set_transient_property( if (streq(name, "FinalKillSignal")) return bus_set_transient_final_kill_signal(u, name, &c->final_kill_signal, message, flags, error); + if (streq(name, "WatchdogSignal")) + return bus_set_transient_watchdog_signal(u, name, &c->watchdog_signal, message, flags, error); + return 0; } |