]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - src/core/unit.h
core,systemctl: add bus API to retrieve processes of a unit
[thirdparty/systemd.git] / src / core / unit.h
index cfdac852a556c119096c5409fff8c7e19d933cfe..5909652976a13d114b3a22556c09ad3a10405928 100644 (file)
@@ -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);
 }