[lxc-devel] [PATCH] Always close all inherited fds and drop --close-all-fds

Stéphane Graber stgraber at ubuntu.com
Thu May 24 16:41:52 UTC 2012


Hello,

Here is a suggestion to always close all inherited fds and get rid of
the existing --close-all-fds (-C) parameter from lxc-start.

This came up during an IRC discussion with Serge on LXC's current
behavior regarding fds.
The current code prints a warning if the user uses lxc-start and
inherits an fd (that used to be a critical error) but doesn't
actually close it. That's unless lxc-start is called with either
-d or -C, with either of these, the warning becomes a notice and
the inherited fds are closed.

I can't think of a case where we want lxc-start to inherit an fd,
so I think it makes sense to do away with that option and just make
it the default.

Stéphane Graber (1):
  Remove --close-all-fds (-C) from lxc-start and always close any
    inherited fd.

 doc/lxc-start.sgml.in |   15 ---------------
 src/lxc/arguments.h   |    3 ---
 src/lxc/conf.h        |    1 -
 src/lxc/lxc_start.c   |   10 +---------
 src/lxc/start.c       |   10 ++--------
 5 files changed, 3 insertions(+), 36 deletions(-)

-- 
1.7.9.5





More information about the lxc-devel mailing list