From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.5/8.7.3) with ESMTP id TAA06253 for ; Wed, 25 Sep 1996 19:10:04 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA12265; Wed, 25 Sep 1996 04:51:22 -0400 (EDT) Resent-Date: Wed, 25 Sep 1996 04:51:22 -0400 (EDT) Message-Id: <199609250851.KAA12941@sgi.ifh.de> X-Authentication-Warning: sgi.ifh.de: Host pws@localhost didn't use HELO protocol To: zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: Process substitution and shell functions In-reply-to: ""Bart Schaefer""'s message of "Tue, 24 Sep 1996 11:01:44 MET." <960924110144.ZM6742@candle.brasslantern.com> Date: Wed, 25 Sep 1996 10:51:05 +0200 From: Peter Stephenson Resent-Message-ID: <"ZWcKI1.0.Z_2.9AFIo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2169 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu "Bart Schaefer" wrote: > On Sep 24, 6:47pm, Louis Granboulan wrote: > } Subject: Re: Process substitution and shell functions > } > } My patch moves the recovering of last_file_list from execpline > } to execshfunc. > } I don't understand why this was in execpline... > > It can't go in execshfunc because execshfunc isn't executed when using > a simple builtin or an external command. Does that matter? last_file_list was only ever set before from execshfunc() and execcursh() via deletepipejob(). It was then set to NULL at the beginning of every pipeline... goodness knows what effect that was supposed to have, but I think LG is saying that the (real) desired effect can be obtained locally in execshfunc() and execcursh(). As far as I can see simple builtins/builtouts didn't need this mechanism, the job.filelist element worked directly. They would only be affected when a new pipeline was started to run one, at which point they would take over the file list from any shell function or {...} construct and delete the appropriate files when they finished, which seems a bit strange (and must have been the cause of the bug being fixed). I agree with LG that there's no obvious reason why shell functions and {...}'s shouldn't be directly responsible for their own file lists. I think the `if (!list_pipe) ...' tests are OK since list_pipe is either set and restored in the same function or unconditionally set to zero, which would presumably be harmless here. Anyway, the patch seems to work O.K. --- unless, of course, you know better. It's quite likely I'm missing something, or a lot. The only worry I have is that temporary files might get left over on an exec. -- Peter Stephenson Tel: +49 33762 77366 WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330 Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen DESY-IfH, 15735 Zeuthen, Germany.