httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Sutton <>
Subject Re: inherited file descriptors on win32...
Date Sun, 10 May 1998 15:50:45 GMT
On Sun, 10 May 1998, Dean Gaudet wrote:
> I'm curious, in the WIN32 port no attempt is made to close any file
> descriptors in spawned children... are they by default not inherited
> across exec?
> ap_cleanup_for_exec() is a no-op ... so using child_cleanups is bogus. 
> I gotta figure out how to do this in NSPR, right now it looks like
> everything is inherited. 

By default, handles opened by Win32 API functions are normally not
inheritable. So children won't get the events opened by OpenEvent or
mutexes from CreateMutex. But the C runtime calls, such as fopen, default
to returning inheritable handles, so yes the child will get them. 

Using CreateProcess instead of spawn* could prevent inheritence.


View raw message