From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8560 invoked from network); 10 Oct 1999 17:53:52 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 10 Oct 1999 17:53:52 -0000 Received: (qmail 20523 invoked by alias); 10 Oct 1999 17:53:46 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 8191 Received: (qmail 20509 invoked from network); 10 Oct 1999 17:53:45 -0000 Subject: Re: PATCH: Re: PATCH: no more fd mixups In-Reply-To: <991010163903.ZM2414@candle.brasslantern.com> from Bart Schaefer at "Oct 10, 1999 4:39: 2 pm" To: schaefer@candle.brasslantern.com (Bart Schaefer) Date: Sun, 10 Oct 1999 18:53:44 +0100 (BST) Cc: zsh-workers@sunsite.auc.dk X-Mailer: ELM [version 2.4ME+ PL48 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Message-Id: From: Zefram Bart Schaefer wrote: >Here's a tweak to Zefram's patch to really limit the descriptors to those >in use by the shell. The substantive change is only to throw in the test >that the descriptor is in the fdtable[] array, OK. One issue: coprocess file descriptors. Should they (a) be passed on to child processes, and (b) be dupable by number? I think they should be completely private (accessible obly via >&p and <&p), but more importantly the answers for (a) and (b) should be the same. At the moment, coprocess fds do not get passed on to children, but they are explicitly marked as public in fdtable[], and hence after your patch they are dupable by number. I *think* all that needs to change is to remove the line fdtable[coprocin] = fdtable[coprocout] = 0; from exec.c (where the coprocess is being opened), but I don't completely follow the use of fdtable[], so I'll leave it to someone with more time on their hands. -zefram