]>
git.ipfire.org Git - thirdparty/systemd.git/blob - src/core/kill.h
1 /* SPDX-License-Identifier: LGPL-2.1-or-later */
4 typedef struct KillContext KillContext
;
11 typedef enum KillMode
{
12 /* The kill mode is a property of a unit. */
13 KILL_CONTROL_GROUP
= 0,
18 _KILL_MODE_INVALID
= -EINVAL
,
24 int restart_kill_signal
;
25 int final_kill_signal
;
31 typedef enum KillWho
{
32 /* Kill who is a property of an operation */
40 _KILL_WHO_INVALID
= -EINVAL
,
43 void kill_context_init(KillContext
*c
);
44 void kill_context_dump(KillContext
*c
, FILE *f
, const char *prefix
);
46 const char *kill_mode_to_string(KillMode k
) _const_
;
47 KillMode
kill_mode_from_string(const char *s
) _pure_
;
49 const char *kill_who_to_string(KillWho k
) _const_
;
50 KillWho
kill_who_from_string(const char *s
) _pure_
;
52 static inline int restart_kill_signal(const KillContext
*c
) {
53 if (c
->restart_kill_signal
!= 0)
54 return c
->restart_kill_signal
;
55 return c
->kill_signal
;