chiark / gitweb /
nspawn: log a warning on failure from wait_for_terminate()
authorLuke Shumaker <LukeShu@sbcglobal.net>
Mon, 30 Jun 2014 00:18:03 +0000 (20:18 -0400)
committerLennart Poettering <lennart@poettering.net>
Mon, 30 Jun 2014 13:13:53 +0000 (15:13 +0200)
This is at the suggestion of Djalal Harouni on the mailing list, and
reflects the behavior of shared/util.c:wait_for_terminate_and_warn().

src/nspawn/nspawn.c

index be0e6b5386a814772ac000f0ba35ee0c93fa2793..8fb72d6d3632efd2a3a2f1c35db1f9e37b6df52b 100644 (file)
@@ -2666,8 +2666,10 @@ static int wait_for_container(pid_t pid, ContainerStatus *container) {
         siginfo_t status;
 
         r = wait_for_terminate(pid, &status);
-        if (r < 0)
+        if (r < 0) {
+                log_warning("Failed to wait for container: %s", strerror(-r));
                 return r;
+        }
 
         switch (status.si_code) {
         case CLD_EXITED: