[systemd-devel] [PATCH] core: send sigabrt on watchdog timeout
Lennart Poettering
mzerqung at 0pointer.de
Mon Oct 27 11:03:28 PDT 2014
On Sat, 25.10.14 23:58, Umut Tezduyar Lindskog (umut.tezduyar at axis.com) wrote:
> if sigabrt doesn't do the job, follow regular shutdown
> routine, sigterm > sigkill.
I like it, with one exception.
>
> diff --git a/src/core/unit.c b/src/core/unit.c
> index e40e6f2..66804c9 100644
> --- a/src/core/unit.c
> +++ b/src/core/unit.c
> @@ -3305,6 +3305,7 @@ int unit_kill_context(
> Unit *u,
> KillContext *c,
> bool sigkill,
> + bool sigabrt,
Hmm, I think it would be better to replace these two bool's with a
single enum. Maybe like this:
typedef enum KillOperation = {
KILL_TERMINATE,
KILL_KILL,
KILL_ABORT,
} KillOperation;
Where KILL_TERMINATE would use c->kill_signal, while KILL_KILL would
use SIGKILL, and KILL_ABORT would use SIGABRT?
Of course, KILL_KILL is an awful name, but I guess that's Unix, we
just inherit that from the weirdly named "kill(pid, SIGKILL)"...
Makes sense?
Lennart
--
Lennart Poettering, Red Hat
More information about the systemd-devel
mailing list