summaryrefslogtreecommitdiff
path: root/src/core/manager.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2013-06-28 04:12:58 +0200
committerLennart Poettering <lennart@poettering.net>2013-06-28 04:12:58 +0200
commitc2756a68401102786be343712c0c35acbd73d28d (patch)
tree64af93633ce57982937323c9a55fe1ecbf076cd1 /src/core/manager.c
parent1508e85878cff23a220b2ff8d6c71418e19797de (diff)
core: add transient units
Transient units can be created via the bus API. They are configured via the method call parameters rather than on-disk files. They are subject to normal GC. Transient units currently may only be created for services (however, we will extend this), and currently only ExecStart= and the cgroup parameters can be configured (also to be extended). Transient units require a unique name, that previously had no configuration file on disk. A tool systemd-run is added that makes use of this functionality to run arbitrary command lines as transient services: $ systemd-run /bin/ping www.heise.de Will cause systemd to create a new transient service and run ping in it.
Diffstat (limited to 'src/core/manager.c')
-rw-r--r--src/core/manager.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/src/core/manager.c b/src/core/manager.c
index 6ba51a4116..42c9bcd48c 100644
--- a/src/core/manager.c
+++ b/src/core/manager.c
@@ -993,7 +993,13 @@ unsigned manager_dispatch_load_queue(Manager *m) {
return n;
}
-int manager_load_unit_prepare(Manager *m, const char *name, const char *path, DBusError *e, Unit **_ret) {
+int manager_load_unit_prepare(
+ Manager *m,
+ const char *name,
+ const char *path,
+ DBusError *e,
+ Unit **_ret) {
+
Unit *ret;
UnitType t;
int r;
@@ -1053,7 +1059,13 @@ int manager_load_unit_prepare(Manager *m, const char *name, const char *path, DB
return 0;
}
-int manager_load_unit(Manager *m, const char *name, const char *path, DBusError *e, Unit **_ret) {
+int manager_load_unit(
+ Manager *m,
+ const char *name,
+ const char *path,
+ DBusError *e,
+ Unit **_ret) {
+
int r;
assert(m);