[PATCH] popen-safer: test O_CLOEXEC at run-time.

2009-08-21 Thread Paolo Bonzini
This patch tests for the presence of O_CLOEXEC at run-time. The technique I use allows to use only two system calls instead of three on system where O_CLOEXEC does not work, at least after the first call to open_noinherit. The code can be moved to an emulation of open by doing something like:

Re: [PATCH] popen-safer: test O_CLOEXEC at run-time.

2009-08-21 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Paolo Bonzini on 8/21/2009 1:42 AM: This patch tests for the presence of O_CLOEXEC at run-time. The technique I use allows to use only two system calls instead of three on system where O_CLOEXEC does not work, at least after the