diff options
author | Lennart Poettering <lennart@poettering.net> | 2012-09-05 16:23:41 -0700 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2012-09-05 16:23:41 -0700 |
commit | d87be9b0af81a6e07d4fb3028e45c4409100dc26 (patch) | |
tree | 3ee0cb8aa69b0919f009f388e934ee3aa2cc2172 /src/shared/util.c | |
parent | cb7ec5645e0edf154f0cc8414f5914cb433d0dfe (diff) |
nspawn: handle poweroff/reboot nicely in containers
Diffstat (limited to 'src/shared/util.c')
-rw-r--r-- | src/shared/util.c | 4 |
1 files changed, 2 insertions, 2 deletions
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) { |