Commit b101fb9b by Christian Brauner Committed by Stéphane Graber

lxccontainer: log failure to send sig to init pid

parent f6e8a291
...@@ -1582,8 +1582,10 @@ static bool do_lxcapi_reboot(struct lxc_container *c) ...@@ -1582,8 +1582,10 @@ static bool do_lxcapi_reboot(struct lxc_container *c)
return false; return false;
if (c->lxc_conf && c->lxc_conf->rebootsignal) if (c->lxc_conf && c->lxc_conf->rebootsignal)
rebootsignal = 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 false;
}
return true; return true;
} }
...@@ -1614,7 +1616,9 @@ static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout) ...@@ -1614,7 +1616,9 @@ static bool do_lxcapi_shutdown(struct lxc_container *c, int timeout)
INFO("Using signal number '%d' as halt signal.", haltsignal); 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); retv = do_lxcapi_wait(c, "STOPPED", timeout);
return retv; return retv;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment