Return-Path: Delivered-To: new-httpd-archive@hyperreal.org Received: (qmail 8524 invoked by uid 6000); 10 May 1998 14:50:50 -0000 Received: (qmail 8511 invoked from network); 10 May 1998 14:50:48 -0000 Received: from gate-isdn.ukweb.com (194.152.65.149) by taz.hyperreal.org with SMTP; 10 May 1998 14:50:48 -0000 Received: from (ecstasy.localnet) [192.168.2.4] by gate-isdn.ukweb.com with smtp (Exim 1.82 #1) id 0yYXR0-0002bh-00; Sun, 10 May 1998 15:50:38 +0100 Date: Sun, 10 May 1998 15:50:45 +0000 (GMT) From: Paul Sutton To: new-httpd@apache.org Subject: Re: inherited file descriptors on win32... In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: new-httpd-owner@apache.org Precedence: bulk Reply-To: new-httpd@apache.org 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. Probably. Using CreateProcess instead of spawn* could prevent inheritence. Paul