]> git.ipfire.org Git - thirdparty/lxc.git/commitdiff
lxccontainer: log failure to send sig to init pid 1329/head
authorChristian Brauner <christian.brauner@ubuntu.com>
Sun, 27 Nov 2016 05:01:36 +0000 (06:01 +0100)
committerChristian Brauner <christian.brauner@ubuntu.com>
Sun, 27 Nov 2016 05:01:36 +0000 (06:01 +0100)
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
src/lxc/lxccontainer.c

index 3a9e1e39f268dabf47c54b9359effac75b6453fa..d96d23eeddbe1d8bdef17904313f8e28c5137a92 100644 (file)
@@ -1582,8 +1582,10 @@ static bool do_lxcapi_reboot(struct lxc_container *c)
                return false;
        if (c->lxc_conf && c->lxc_conf->rebootsignal)
                rebootsignal = c->lxc_conf->rebootsignal;
-       if (kill(pid, rebootsignal) < 0)
+       if (kill(pid, rebootsignal) < 0) {
+               WARN("Could not send signal %d to pid %d.", rebootsignal, pid);
                return false;
+       }
        return true;
 
 }
@@ -1614,7 +1616,9 @@ static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout)
 
        INFO("Using signal number '%d' as halt signal.", haltsignal);
 
-       kill(pid, haltsignal);
+       if (kill(pid, haltsignal) < 0)
+               WARN("Could not send signal %d to pid %d.", haltsignal, pid);
+
        retv = do_lxcapi_wait(c, "STOPPED", timeout);
        return retv;
 }