summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-register.h
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2017-06-28 19:22:46 +0200
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2017-06-28 13:22:46 -0400
commitcd2dfc6faea2a1e2370ae52460247bb6c8c553b1 (patch)
treeb2def0db525ac57c4404e6c2beffa486f2d43e00 /src/nspawn/nspawn-register.h
parent694859b5e74de0ad291453493b117c522b1e2ada (diff)
downloadsystemd-cd2dfc6faea2a1e2370ae52460247bb6c8c553b1.tar.gz
nspawn: register a scope for the unit if --register=no is specified (#6166)
Previously, only when --register=yes was set (the default) the invoked container would get its own scope, created by machined on behalf of nspawn. With this change if --register=no is set nspawn will still get its own scope (which is a good thing, so that --slice= and --property= take effect), but this is not done through machined but by registering a scope unit directly in PID 1. Summary: --register=yes → allocate a new scope through machined (the default) --register=yes --keep-unit → use the unit we are already running in an register with machined --register=no → allocate a new scope directly, but no machined --register=no --keep-unit → do not allocate nor register anything Fixes: #5823
Diffstat (limited to 'src/nspawn/nspawn-register.h')
-rw-r--r--src/nspawn/nspawn-register.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/nspawn/nspawn-register.h b/src/nspawn/nspawn-register.h
index 304c5a485b..6694b3f6b1 100644
--- a/src/nspawn/nspawn-register.h
+++ b/src/nspawn/nspawn-register.h
@@ -27,3 +27,5 @@
int register_machine(const char *machine_name, pid_t pid, const char *directory, sd_id128_t uuid, int local_ifindex, const char *slice, CustomMount *mounts, unsigned n_mounts, int kill_signal, char **properties, bool keep_unit, const char *service);
int terminate_machine(pid_t pid);
+
+int allocate_scope(const char *machine_name, pid_t pid, const char *slice, CustomMount *mounts, unsigned n_mounts, int kill_signal, char **properties);