]> git.ipfire.org Git - thirdparty/lxc.git/commit
lxc-cmd-stop: two fixes
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Mon, 13 Apr 2015 21:19:47 +0000 (21:19 +0000)
committerStéphane Graber <stgraber@ubuntu.com>
Fri, 14 Aug 2015 16:59:10 +0000 (12:59 -0400)
commit29d8d3fee71b457b241eefbea966ea05e49dc49c
treec056a1c55ff3e4f9d2453b01fcebf1d922aa9c85
parent28799990367fc61af9506a3e3896806ac1e1cd9e
lxc-cmd-stop: two fixes

These are two fixes for long, long-standing bugs.

1. When we stop a container from the lxc_cmd stop handler, we kill its
init task, then we unfreeze the container to make sure it receives the
signal.  When that unfreeze succeeds, we were immediately returning 0,
without sending a response to the invoker.

2. lxc_cmd returns the length of the field received.  In the case of
an lxc_cmd_stop this is 16.  But a comment claims we expect no response,
only a 0.  In fact the handler does send a response, which may or may
not include an error.  So don't call an error just because we got back a
response.

Signed-off-by: Serge Hallyn <serge.hallyn@ubuntu.com>
Acked-by: Stéphane Graber <stgraber@ubuntu.com>
src/lxc/commands.c