Skip to content

Commit

Permalink
start: close data socket in parent
Browse files Browse the repository at this point in the history
Brings the number of open fds in the monitor process for a standard container
without ttys down to 17.

Signed-off-by: Christian Brauner <christian.brauner@ubuntu.com>
  • Loading branch information
Christian Brauner authored and stgraber committed Nov 16, 2017
1 parent 7a687c3 commit 37d5831
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/lxc/start.c
Expand Up @@ -1149,6 +1149,11 @@ int __lxc_start(const char *name, struct lxc_conf *conf,
ERROR("failed to spawn '%s'", name);
goto out_fini_nonet;
}
/* close parent side of data socket */
close(handler->data_sock[0]);
handler->data_sock[0] = -1;
close(handler->data_sock[1]);
handler->data_sock[1] = -1;

handler->conf->reboot = 0;

Expand Down

0 comments on commit 37d5831

Please sign in to comment.