Quoting Dwight Engen ([email protected]): > On Fri, 7 Mar 2014 17:27:38 -0600 > Serge Hallyn <[email protected]> wrote: > > > Quoting Dwight Engen ([email protected]): > > > This came up as I was chasing an fd leak with valgrind that showed > > > up in the fork()ed child. There is no reason we can't just close > > > the fd before the fork which also simplifies the code. > > > > There is though - the ongoing_create() functions checks the pid of the > > task holding the lock on the /partial file. If you close it > > immediately, then a racing create or start will assume that the create > > failed and remove the container. > > > > So unfortunately we can't close that fd until we're done. > > Got it, thanks, sorry for the noise. I missed the unlock on close > thing. Do you think its worthwhile to close it just in the child since > the lock won't be inherited across fork?
Yup, that sounds good, thanks. -serge _______________________________________________ lxc-devel mailing list [email protected] http://lists.linuxcontainers.org/listinfo/lxc-devel
