diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-22 14:03:33 -0400 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2016-04-22 14:03:33 -0400 |
commit | 47cb7f723a492f9f3e8bd80c1615949a4ec505b3 (patch) | |
tree | c1dd0f72cec5f6e31f85eee8c23d400b8d7768f4 /src/core/unit.h | |
parent | a11fe93e04e775c3ce2ace92be761d5ff9fce2d9 (diff) | |
parent | b8c7afdf4b2688ba4bb72cb7ccdcd60c10f35d01 (diff) |
Merge pull request #3078 from poettering/get-processes
A variety of fixes and additions
Diffstat (limited to 'src/core/unit.h')
-rw-r--r-- | src/core/unit.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/core/unit.h b/src/core/unit.h index cfdac852a5..5909652976 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -390,6 +390,12 @@ struct UnitVTable { /* Returns the next timeout of a unit */ int (*get_timeout)(Unit *u, usec_t *timeout); + /* Returns the main PID if there is any defined, or 0. */ + pid_t (*main_pid)(Unit *u); + + /* Returns the main PID if there is any defined, or 0. */ + pid_t (*control_pid)(Unit *u); + /* This is called for each unit type and should be used to * enumerate existing devices and load them. However, * everything that is loaded here should still stay in @@ -601,6 +607,9 @@ bool unit_type_supported(UnitType t); bool unit_is_pristine(Unit *u); +pid_t unit_control_pid(Unit *u); +pid_t unit_main_pid(Unit *u); + static inline bool unit_supported(Unit *u) { return unit_type_supported(u->type); } |