X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=blobdiff_plain;f=src%2Fcore%2Funit.h;h=bbad546356c6114c08a2e2df4933c5b08d273661;hb=f189ab18de69d3dee81117d7925fb370cd038f0f;hp=a773762f36950a6a81543173c07919cfa1824e2d;hpb=cb87a73b45503eaa6bead291423a529b00d27156;p=elogind.git diff --git a/src/core/unit.h b/src/core/unit.h index a773762f3..bbad54635 100644 --- 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 "failure-action.h" enum UnitActiveState { UNIT_ACTIVE, @@ -112,7 +113,10 @@ struct Unit { /* 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; + FailureAction job_timeout_action; + char *job_timeout_reboot_arg; /* References to this */ LIST_HEAD(UnitRef, refs); @@ -127,12 +131,6 @@ struct Unit { dual_timestamp active_exit_timestamp; dual_timestamp inactive_enter_timestamp; - /* Counterparts in the cgroup filesystem */ - char *cgroup_path; - CGroupControllerMask cgroup_realized_mask; - CGroupControllerMask cgroup_subtree_mask; - CGroupControllerMask cgroup_members_mask; - UnitRef slice; /* Per type list */ @@ -176,6 +174,15 @@ struct Unit { /* Cached unit file state */ UnitFileState unit_file_state; + /* Counterparts in the cgroup filesystem */ + char *cgroup_path; + CGroupControllerMask cgroup_realized_mask; + CGroupControllerMask cgroup_subtree_mask; + CGroupControllerMask cgroup_members_mask; + + /* How to start OnFailure units */ + JobMode on_failure_job_mode; + /* Garbage collect us we nobody wants or requires us anymore */ bool stop_when_unneeded; @@ -191,9 +198,6 @@ struct Unit { /* Allow isolation requests */ bool allow_isolate; - /* How to start OnFailure units */ - JobMode on_failure_job_mode; - /* Ignore this unit when isolating */ bool ignore_on_isolate;