From: cs at spock.rhein-neckar.de (Carsten Schabacker)
Date: 13 Apr 1999 12:02:51 +0200
Subject: forking + stdout = confusion
References: <RUgQ2.31$Oq4.32657@newsfeed.avtel.net>
Message-ID: <87n20caldg.fsf@spock.localnet.de>
X-UID: 464                                                  

clarence at silcom.com (Clarence Gardner) writes:

> I thought that maybe sys.stdout was using a dup()'ed copy of stdout,
> but I checked sys.stdout.fileno() and it was 1, so that doesn't seem
> to be the case.
No, the child and the parent share the SAME filedescriptors.  This is true
for ALL open files!  So if you don't need the descriptors in a child or a
parent you should close them.  

Apache waits for the end of the file, so all processes (parents and
childs) must close the file!

greetings from germany
Carsten




