zsh-users
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-users@zsh.org
Subject: Re: process substitution bug with set -e?
Date: Tue, 15 Oct 2013 07:29:47 -0700	[thread overview]
Message-ID: <131015072947.ZM1984@torch.brasslantern.com> (raw)
In-Reply-To: <20131015094248.1cb9611d@pwslap01u.europe.root.pri>

On Oct 15,  9:42am, Peter Stephenson wrote:
}
} What scope should be trying to cover here?  Simply document for process
} substiution that if the code to which the substitution applies exits
} early the shell won't wait for it to finish?  Or can we infer something
} a bit wider?

I think we should be able to say something more general about the behavior
of "exit" with respect to asynchronous jobs, and that ERR_EXIT has the
same behavior.  There's a little about this in the "Jobs" section but it
only references explicitly backgrounded jobs and the HUP signal/option,
not about implicitly asynchronous jobs.

For example, note that multios and process substitutions are "disowned"
in the sense that they don't get HUP'd (they also don't get TTOU'd, but
aren't able to read from the terminal as far as I can tell [I/O error]).

We could further explain the generality that any pair of jobs that act as
a reader and a writer -- multios, process substitutions, pipes, are there
more? -- have to be run in parallel to avoid deadlock, which means that
at least one of each such pair is "implicitly asynchronous" in the sense
I used above.  Yeah, that's a misuse of "implicit" because the user has
of course explicity written >>(...) or whatever, so maybe there's another
way to say it.

I suppose the tail end of the "Jobs" section is the right place to put
this, even though that's somewhat distant from the descriptions of the
syntax that evoke the behavior.


  reply	other threads:[~2013-10-15 14:29 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-10-14 12:41 Vincent Lefevre
2013-10-14 13:48 ` Peter Stephenson
2013-10-14 15:08   ` Vincent Lefevre
2013-10-14 16:23     ` Bart Schaefer
2013-10-14 16:28     ` Peter Stephenson
2013-10-14 17:47       ` Bart Schaefer
2013-10-15  8:42         ` Peter Stephenson
2013-10-15 14:29           ` Bart Schaefer [this message]
2013-10-16 17:53             ` Peter Stephenson

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=131015072947.ZM1984@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-users@zsh.org \
    /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).