apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Peter N. Lundblad" <pe...@famlundblad.se>
Subject Pipe inheritance
Date Tue, 17 Jan 2006 14:01:35 GMT

While debugging a Subversion problem, I noted that when
apr_file_pipe_create is called on Linux, the created file descriptors are
inherited to child processes by default (luckily, one can reset this).
This is inconsistent with the default for apr_file_open.  If I understand
it correctly, the Windows code also does *not* make the pipe ends
inherited by default (it zero-inits the apr_file_t struct and doesn't seem
to touch the flags, leaving INHERIT unset.
Nothing of this is documented in apr_file_io.h.

While I can see the reason for pipes to be inherited by default, it seems
inconsistent to do so, and you normally only want one end to be inherited,
so you don't save any code by having that default.

I could easily provide a patch for this if you want to.  Any thoughts?


View raw message