Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Process substitution and shell functions
- X-seq: zsh-workers 2169
- From: Peter Stephenson <pws@xxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Process substitution and shell functions
- Date: Wed, 25 Sep 1996 10:51:05 +0200
- In-reply-to: ""Bart Schaefer""'s message of "Tue, 24 Sep 1996 11:01:44 MET." <960924110144.ZM6742@xxxxxxxxxxxxxxxxxxxxxxx>
"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 <pws@xxxxxx> 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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author