]> git.ipfire.org Git - thirdparty/lxc.git/commit
commands: handle epipe
authorSerge Hallyn <serge.hallyn@ubuntu.com>
Tue, 25 Mar 2014 20:50:06 +0000 (15:50 -0500)
committerStéphane Graber <stgraber@ubuntu.com>
Tue, 25 Mar 2014 22:38:39 +0000 (18:38 -0400)
commit6168ff15aac16bcccbcf22b4ba915870844e96a4
treedd185fc7c77693467325031a6f9812856ec3a1c8
parent70084daff6b4e75608ccb780423f43be28cbed6a
commands: handle epipe

If we start a lxc_wait on a container while it is exiting, it is
possible that we open the command socket, then the command socket
monitor closes all its mainloop sockets and exit, then we send our
credentials. Then we get killed by SIGPIPE.

Handle that case, recognizing that if we get sigpipe then the
container is (now) stopped.

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