Re: [lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-10 Thread Serge Hallyn
Quoting Tycho Andersen (tycho.ander...@canonical.com): > In various places throughout the code, we want to "nullify" the std fds, > opening them to /dev/null or zero or so. Instead, let's unify this code and do > it in such a way that Coverity (probably) won't complain. > > v2: use /dev/null for s

[lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-10 Thread Tycho Andersen
In various places throughout the code, we want to "nullify" the std fds, opening them to /dev/null or zero or so. Instead, let's unify this code and do it in such a way that Coverity (probably) won't complain. v2: use /dev/null for stdin as well v3: add a comment about use of C's short circuiting

Re: [lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-09 Thread Robert Vogelgesang
Hi Tycho, On Tue, Jun 09, 2015 at 05:48:52AM -0600, Tycho Andersen wrote: > On Tue, Jun 09, 2015 at 11:48:05AM +0200, Robert Vogelgesang wrote: > > Hi, > > > > On Mon, Jun 08, 2015 at 07:59:54PM -0600, Tycho Andersen wrote: > > > In various places throughout the code, we want to "nullify" the std

Re: [lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-09 Thread Tycho Andersen
On Tue, Jun 09, 2015 at 11:48:05AM +0200, Robert Vogelgesang wrote: > Hi, > > On Mon, Jun 08, 2015 at 07:59:54PM -0600, Tycho Andersen wrote: > > In various places throughout the code, we want to "nullify" the std fds, > > opening them to /dev/null or zero or so. Instead, let's unify this code and

Re: [lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-09 Thread Robert Vogelgesang
Hi, On Mon, Jun 08, 2015 at 07:59:54PM -0600, Tycho Andersen wrote: > In various places throughout the code, we want to "nullify" the std fds, > opening them to /dev/null or zero or so. Instead, let's unify this code and > do it in such a way that Coverity (probably) won't complain. > > Reported-

[lxc-devel] [PATCH 4/4] uniformly nullify std fds

2015-06-08 Thread Tycho Andersen
In various places throughout the code, we want to "nullify" the std fds, opening them to /dev/null or zero or so. Instead, let's unify this code and do it in such a way that Coverity (probably) won't complain. Reported-by: Coverity Signed-off-by: Tycho Andersen --- src/lxc/bdev.c | 8 ++