zsh-workers
 help / color / mirror / code / Atom feed
From: Peter Stephenson <pws@ifh.de>
To: zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: Process substitution and shell functions
Date: Wed, 25 Sep 1996 10:51:05 +0200	[thread overview]
Message-ID: <199609250851.KAA12941@sgi.ifh.de> (raw)
In-Reply-To: ""Bart Schaefer""'s message of "Tue, 24 Sep 1996 11:01:44 MET." <960924110144.ZM6742@candle.brasslantern.com>

"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@ifh.de>       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.


  reply	other threads:[~1996-09-25  9:10 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-09-20 23:02 Bart Schaefer
1996-09-21 18:39 ` Louis Granboulan
1996-09-24 16:47 ` Louis Granboulan
1996-09-24 18:01   ` Bart Schaefer
1996-09-25  8:51     ` Peter Stephenson [this message]
1996-09-26 18:32       ` Bart Schaefer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199609250851.KAA12941@sgi.ifh.de \
    --to=pws@ifh.de \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).