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/shared/unit-name.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src/shared/unit-name.c') diff --git a/src/shared/unit-name.c b/src/shared/unit-name.c index bf1ab794a8..f2c30a6e4f 100644 --- a/src/shared/unit-name.c +++ b/src/shared/unit-name.c @@ -44,7 +44,8 @@ static const char* const unit_type_table[_UNIT_TYPE_MAX] = { [UNIT_TIMER] = "timer", [UNIT_SWAP] = "swap", [UNIT_PATH] = "path", - [UNIT_SLICE] = "slice" + [UNIT_SLICE] = "slice", + [UNIT_SCOPE] = "scope" }; DEFINE_STRING_TABLE_LOOKUP(unit_type, UnitType); -- cgit v1.2.3-54-g00ecf