summaryrefslogtreecommitdiff
path: root/src/shared/util.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2012-09-05 16:23:41 -0700
committerLennart Poettering <lennart@poettering.net>2012-09-05 16:23:41 -0700
commitd87be9b0af81a6e07d4fb3028e45c4409100dc26 (patch)
tree3ee0cb8aa69b0919f009f388e934ee3aa2cc2172 /src/shared/util.c
parentcb7ec5645e0edf154f0cc8414f5914cb433d0dfe (diff)
nspawn: handle poweroff/reboot nicely in containers
Diffstat (limited to 'src/shared/util.c')
-rw-r--r--src/shared/util.c4
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) {