From 6c12b52e19640747e96f89d85422941a23dc6b29 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Mon, 1 Jul 2013 00:03:57 +0200 Subject: core: add new "scope" unit type for making a unit of pre-existing processes "Scope" units are very much like service units, however with the difference that they are created from pre-existing processes, rather than processes that systemd itself forks off. This means they are generated programmatically via the bus API as transient units rather than from static configuration read from disk. Also, they do not provide execution-time parameters, as at the time systemd adds the processes to the scope unit they already exist and the parameters cannot be applied anymore. The primary benefit of this new unit type is to create arbitrary cgroups for worker-processes forked off an existing service. This commit also adds a a new mode to "systemd-run" to run the specified processes in a scope rather then a transient service. --- src/core/unit.h | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/core/unit.h') diff --git a/src/core/unit.h b/src/core/unit.h index 8a62787b38..ed4df18246 100644 --- a/src/core/unit.h +++ b/src/core/unit.h @@ -280,6 +280,7 @@ typedef enum UnitSetPropertiesMode { #include "swap.h" #include "path.h" #include "slice.h" +#include "scope.h" struct UnitVTable { /* How much memory does an object of this unit type need */ @@ -462,6 +463,7 @@ DEFINE_CAST(SNAPSHOT, Snapshot); DEFINE_CAST(SWAP, Swap); DEFINE_CAST(PATH, Path); DEFINE_CAST(SLICE, Slice); +DEFINE_CAST(SCOPE, Scope); Unit *unit_new(Manager *m, size_t size); void unit_free(Unit *u); -- cgit v1.2.3