diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-05-07 14:37:32 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-05-11 22:10:36 +0200 |
commit | 27023c0ef5701d31ae2a985d986674282d465b0f (patch) | |
tree | 2bafb00f10f7b01f83135a3480debd44a68235b9 /src | |
parent | c2570ab99be82eddbee0f397fbf8704a95f6f736 (diff) |
nspawn: pass on kill signal setting to contaner scope
Let's just pass on what the user set for us.
Diffstat (limited to 'src')
-rw-r--r-- | src/nspawn/nspawn.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/src/nspawn/nspawn.c b/src/nspawn/nspawn.c index 05d2c71e45..2f7dd53bd0 100644 --- a/src/nspawn/nspawn.c +++ b/src/nspawn/nspawn.c @@ -2040,7 +2040,17 @@ static int register_machine(pid_t pid, int local_ifindex) { "/dev/pts/ptmx", "rw", "char-pts", "rw"); if (r < 0) - return log_error_errno(r, "Failed to add device whitelist: %m"); + return bus_log_create_error(r); + + if (arg_kill_signal != 0) { + r = sd_bus_message_append(m, "(sv)", "KillSignal", "i", arg_kill_signal); + if (r < 0) + return bus_log_create_error(r); + + r = sd_bus_message_append(m, "(sv)", "KillMode", "s", "mixed"); + if (r < 0) + return bus_log_create_error(r); + } STRV_FOREACH(i, arg_property) { r = sd_bus_message_open_container(m, 'r', "sv"); |