Received: by taz.hyperreal.com (8.8.4/V2.0) id QAA15985; Fri, 7 Feb 1997 16:29:48 -0800 (PST) Received: from scanner.worldgate.com by taz.hyperreal.com (8.8.4/V2.0) with ESMTP id QAA15981; Fri, 7 Feb 1997 16:29:45 -0800 (PST) Received: from znep.com (uucp@localhost) by scanner.worldgate.com (8.8.5/8.7.3) with UUCP id RAA03563 for new-httpd@hyperreal.com; Fri, 7 Feb 1997 17:29:43 -0700 (MST) Received: from localhost (marcs@localhost) by alive.ampr.ab.ca (8.7.5/8.7.3) with SMTP id RAA02326 for ; Fri, 7 Feb 1997 17:21:24 -0700 (MST) Date: Fri, 7 Feb 1997 17:21:24 -0700 (MST) From: Marc Slemko X-Sender: marcs@alive.ampr.ab.ca To: new-httpd@hyperreal.com Subject: Re: [PATCH] fd leaks In-Reply-To: <199702071614.KAA00774@sierra.zyzzyva.com> 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@hyperreal.com +1, what about mod_mime and is there any reason not to have a pfclose? In some cases the pool may not be destroyed for a little bit. On Fri, 7 Feb 1997, Randy Terbush wrote: > I saw reference by Dean of a patch for this, but I must have missed > it. Confusion? > > > > =================================================================== > RCS file: /export/home/cvs/apache/src/http_core.c,v > retrieving revision 1.64 > diff -c -r1.64 http_core.c > *** http_core.c 1997/02/03 02:42:57 1.64 > --- http_core.c 1997/02/07 16:09:29 > *************** > *** 1288,1296 **** > > #ifdef __EMX__ > /* Need binary mode for OS/2 */ > ! f = fopen (r->filename, "rb"); > #else > ! f = fopen (r->filename, "r"); > #endif > > if (f == NULL) { > --- 1288,1296 ---- > > #ifdef __EMX__ > /* Need binary mode for OS/2 */ > ! f = pfopen (r->pool, r->filename, "rb"); > #else > ! f = pfopen (r->pool, r->filename, "r"); > #endif > > if (f == NULL) { > *************** > *** 1319,1325 **** > } > } > > - fclose(f); > return OK; > } > > --- 1319,1324 ---- > Index: mod_asis.c > =================================================================== > RCS file: /export/home/cvs/apache/src/mod_asis.c,v > retrieving revision 1.10 > diff -c -r1.10 mod_asis.c > *** mod_asis.c 1997/01/01 18:10:26 1.10 > --- mod_asis.c 1997/02/07 16:08:22 > *************** > *** 69,75 **** > return NOT_FOUND; > } > > ! f = fopen (r->filename, "r"); > > if (f == NULL) { > log_reason("file permissions deny server access", r->filename, r); > --- 69,75 ---- > return NOT_FOUND; > } > > ! f = pfopen (r->pool, r->filename, "r"); > > if (f == NULL) { > log_reason("file permissions deny server access", r->filename, r); > *************** > *** 98,104 **** > soft_timeout ("send", r); > send_http_header (r); > if (!r->header_only) send_fd (f, r); > - fclose (f); > return OK; > } > > --- 98,103 ---- > > >