apr-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Brian Havard <bri...@kheldar.apana.org.au>
Subject Re: svn commit: r584943 - /apr/apr/trunk/include/arch/os2/apr_arch_inherit.h
Date Tue, 30 Oct 2007 12:20:00 GMT
wrowe@apache.org wrote:
> Author: wrowe
> Date: Mon Oct 15 15:07:32 2007
> New Revision: 584943
>
> URL: http://svn.apache.org/viewvc?rev=584943&view=rev
> Log:
> OS2 fails to fork-for-exec, and therefore doesn't use the
> apr_pool_cleanup_for_exec hook, which means it's leaking
> like a sieve.  This alternate implementation of the function
> is sub-optimal because parallel threads can be setting up
> handles to be inherited, and this just isn't healthy.
>
> The best fix is to create all handles uninherited, and only
> toggle the std streams to be inherited in apr_proc_create().
>
> I'm happy to work with any OS2 folk to make that happen.
>
> Added:
>     apr/apr/trunk/include/arch/os2/apr_arch_inherit.h   (with props)
>   
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?
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.

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


Mime
View raw message