On Tue, 2009-03-03 at 18:08 -0600, William A. Rowe, Jr. wrote: > I believe that is correct. Anyone else care to validate? As far as I know > this change is a noop, until the introduction of this most recent file > inheritance patch for CLOEXEC.
After reading apr_os_file_put() (which is used to open stdin/stdout/stderr), it seems that we have this in there: (*file)->flags = flags | APR_FILE_NOCLEANUP; Meaning, no cleanup will be registered for this file. If this flag is set, inheritance setting won't work either (we explicitly go out of those macros with APR_EINVAL if APR_FILE_NOCLEANUP is set), so nobody can set such files to be CLOEXEC through APR by mistake. In other words, they should always be inherited, unless CLOEXEC was used on the OS level to open stdin/stdout/stderr. Does that make sense? -- Bojan
