apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "William A. Rowe, Jr." <wr...@rowe-clan.net>
Subject Re: svn commit: r584943 - /apr/apr/trunk/include/arch/os2/apr_arch_inherit.h
Date Tue, 30 Oct 2007 16:44:42 GMT
Brian Havard wrote:
> Ok, I'll bite.


> I haven't been following this much but I gather we're trying to stop 
> child processes inheriting file handles they're not supposed to. Is that 
> it?

Yes; also our ABI implied, and now requires (in 1.3.0) that all three std
handles will be inherited, either explicitly, or default if none was given.

UNLESS they use io_set with the new NO_FILE flag!

> As it stands, your include/arch/os2/apr_arch_inherit.h doesn't compile 
> and when I tweaked it to do so, sockets.c fails to compile because it 
> was also using APR_IMPLEMENT_INHERIT_SET/UNSET and OS/2 sockets don't 
> have a filedes.

Sorry for the typos; about the sockets, hmmm.  Thinking.

Can we just make an alternate #ifdef OS2 flavor of the sockets inherit
impelementation stubs that don't touch fd's?

> I'll knock up a patch for making apr_file_open() open files 
> non-inheritable by default.

That is truly the best solution, it respects the laws of unintended
consequences on threaded servers.

Is it possible to dup-handle-to-process so we can dup-and-feed a series
of additional handles at a child?  (Not sockets, apparently ;-)

View raw message