From owner-cvs-all Fri Dec 21 22:13:55 2001 Delivered-To: cvs-all@freebsd.org Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by hub.freebsd.org (Postfix) with ESMTP id 72B8837B416; Fri, 21 Dec 2001 22:13:44 -0800 (PST) Received: from bde.zeta.org.au (bde.zeta.org.au [203.2.228.102]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id RAA20551; Sat, 22 Dec 2001 17:13:40 +1100 Date: Sat, 22 Dec 2001 17:13:45 +1100 (EST) From: Bruce Evans X-X-Sender: To: Cc: Erik Trulsson , Steve Price , Andreas Klemm , , Subject: Re: sh patch Re: cvs commit: ports/print/apsfilter Makefile ports/print/apsfilter/files patch-bin::aps2file ports/print/apsfilter/scriptspre-configure In-Reply-To: <3C23CBE8.D7DDEE80@bellatlantic.net> Message-ID: <20011222164918.Q7048-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Fri, 21 Dec 2001, Sergey Babkin wrote: > Bruce Evans wrote: > > This seems to introduce a race by moving the close after the INTON. > > That seems to be OK: in popredir() it first closes the old > descriptor then moves the saved descriptor to the new descriptor, > in clearredir() it just closes the saved descriptors and leaves > the old descriptors alone. My understanding is that INTOFF and Yes, this might work because there are only leak possibilities for descriptors 0..9 and popredir() closes these almost unconditionally. The symptoms of brokenness would be redirects failing, not fd leaks, since the shell only uses small fd's (0..10 only?). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message