From 27023c0ef5701d31ae2a985d986674282d465b0f Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 7 May 2015 14:37:32 -0700 Subject: nspawn: pass on kill signal setting to contaner scope Let's just pass on what the user set for us. --- src/nspawn/nspawn.c | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'src/nspawn') 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"); -- cgit v1.2.3-54-g00ecf