Re: [lxc-devel] [PATCH 3/6] Add fopen_cloexec function to emulate 'e' mode

2013-09-10 Thread Christian Seiler
Hi Serge, > Though the special case for calling open() without a mode arg seems > unnecessary since when called without O_CREAT, mode is supposed to be > ignored. Oh, I never looked too closely at open and I simply went with the function signatures in the manpage. Feel free to simplify that. --

Re: [lxc-devel] [PATCH 3/6] Add fopen_cloexec function to emulate 'e' mode

2013-09-09 Thread Serge Hallyn
Quoting Christian Seiler (christ...@iwakd.de): > Newer glibc versions (that we can't require) allow for an additional > letter 'e' in the fopen mode that will cause the file to be opened with > the O_CLOEXEC flag, so that it will be closed if the program exec()s > away. This is important because if

[lxc-devel] [PATCH 3/6] Add fopen_cloexec function to emulate 'e' mode

2013-09-08 Thread Christian Seiler
Newer glibc versions (that we can't require) allow for an additional letter 'e' in the fopen mode that will cause the file to be opened with the O_CLOEXEC flag, so that it will be closed if the program exec()s away. This is important because if liblxc is used in a multithreaded program, another thr