Skip to content

Commit

Permalink
lxccontainer: use close_prot_errno_disarm() on state_socket_pair
Browse files Browse the repository at this point in the history
Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed May 14, 2020
1 parent dd2f1aa commit 3f96727
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/lxc/lxccontainer.c
Expand Up @@ -830,14 +830,12 @@ static bool wait_on_daemonized_start(struct lxc_handler *handler, int pid)
DEBUG("First child %d exited", pid);

/* Close write end of the socket pair. */
close(handler->state_socket_pair[1]);
handler->state_socket_pair[1] = -1;
close_prot_errno_disarm(handler->state_socket_pair[1]);

state = lxc_rcv_status(handler->state_socket_pair[0]);

/* Close read end of the socket pair. */
close(handler->state_socket_pair[0]);
handler->state_socket_pair[0] = -1;
close_prot_errno_disarm(handler->state_socket_pair[0]);

if (state < 0) {
SYSERROR("Failed to receive the container state");
Expand Down

0 comments on commit 3f96727

Please sign in to comment.