From d87be9b0af81a6e07d4fb3028e45c4409100dc26 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Wed, 5 Sep 2012 16:23:41 -0700 Subject: nspawn: handle poweroff/reboot nicely in containers --- src/shared/util.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/shared') diff --git a/src/shared/util.c b/src/shared/util.c index 95b577be0e..4f5cb26e3c 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -4011,7 +4011,8 @@ int wait_for_terminate_and_warn(const char *name, pid_t pid) { assert(name); assert(pid > 1); - if ((r = wait_for_terminate(pid, &status)) < 0) { + r = wait_for_terminate(pid, &status); + if (r < 0) { log_warning("Failed to wait for %s: %s", name, strerror(-r)); return r; } @@ -4034,7 +4035,6 @@ int wait_for_terminate_and_warn(const char *name, pid_t pid) { log_warning("%s failed due to unknown reason.", name); return -EPROTO; - } _noreturn_ void freeze(void) { -- cgit v1.2.3-54-g00ecf