chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
core: send sigabrt on watchdog timeout to get the stacktrace
[elogind.git]
/
src
/
core
/
unit.h
diff --git
a/src/core/unit.h
b/src/core/unit.h
index 43ab4d1045de148a8e86949cb8d99476326b6e75..081ab18f10289fd2b74dc2e9dc97e8ed959ddfcb 100644
(file)
--- a/
src/core/unit.h
+++ b/
src/core/unit.h
@@
-41,6
+41,7
@@
typedef struct UnitStatusMessageFormats UnitStatusMessageFormats;
#include "condition.h"
#include "install.h"
#include "unit-name.h"
#include "condition.h"
#include "install.h"
#include "unit-name.h"
+#include "failure-action.h"
enum UnitActiveState {
UNIT_ACTIVE,
enum UnitActiveState {
UNIT_ACTIVE,
@@
-53,6
+54,12
@@
enum UnitActiveState {
_UNIT_ACTIVE_STATE_INVALID = -1
};
_UNIT_ACTIVE_STATE_INVALID = -1
};
+typedef enum KillOperation {
+ KILL_TERMINATE,
+ KILL_KILL,
+ KILL_ABORT,
+} KillOperation;
+
static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) {
return t == UNIT_ACTIVE || t == UNIT_RELOADING;
}
static inline bool UNIT_IS_ACTIVE_OR_RELOADING(UnitActiveState t) {
return t == UNIT_ACTIVE || t == UNIT_RELOADING;
}
@@
-112,7
+119,10
@@
struct Unit {
/* JOB_NOP jobs are special and can be installed without disturbing the real job. */
Job *nop_job;
/* JOB_NOP jobs are special and can be installed without disturbing the real job. */
Job *nop_job;
+ /* Job timeout and action to take */
usec_t job_timeout;
usec_t job_timeout;
+ FailureAction job_timeout_action;
+ char *job_timeout_reboot_arg;
/* References to this */
LIST_HEAD(UnitRef, refs);
/* References to this */
LIST_HEAD(UnitRef, refs);
@@
-572,7
+582,7
@@
int unit_write_drop_in_private_format(Unit *u, UnitSetPropertiesMode mode, const
int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name);
int unit_remove_drop_in(Unit *u, UnitSetPropertiesMode mode, const char *name);
-int unit_kill_context(Unit *u, KillContext *c,
bool sigkill
, pid_t main_pid, pid_t control_pid, bool main_pid_alien);
+int unit_kill_context(Unit *u, KillContext *c,
KillOperation k
, pid_t main_pid, pid_t control_pid, bool main_pid_alien);
int unit_make_transient(Unit *u);
int unit_make_transient(Unit *u);