From: "René Neumann" <lists@necoro.eu>
To: zsh-users@zsh.org
Subject: Re: Implicit killing of subprocesses
Date: Wed, 28 Aug 2013 18:27:30 +0200 [thread overview]
Message-ID: <521E24F2.3000004@necoro.eu> (raw)
In-Reply-To: <20130828171136.1c649660@pwslap01u.europe.root.pri>
Am 28.08.2013 18:11, schrieb Peter Stephenson:
> On Wed, 28 Aug 2013 08:59:52 -0700
> Bart Schaefer <schaefer@brasslantern.com> wrote:
>> On Aug 28, 2:47pm, Peter Stephenson wrote:
>> }
>> } In this case, the NOHUP option is irrelevant --- because you don't have
>> } job control (it's determined by the MONITOR option which is unset in
>> } non-interactive shells), the shell doesn't send SIGHUP to processes on
>> } exiting (without job control it doesn't have much idea of which
>> } processes would need it). So I think you get the effect you want.
>>
>> I think the effect Rene wants is that the coproc job DOES get killed when
>> the script exits?
>
> Oh, right.
>
>
> coproc cat
> coproc_pid=$!
>
> TRAPEXIT() { kill $coproc_pid }
Gets problematic though with
coproc cat | grep foo
as $! now only holds the PID of grep.
- René
next prev parent reply other threads:[~2013-08-28 16:27 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-08-28 12:54 René Neumann
2013-08-28 13:02 ` René Neumann
2013-08-28 13:26 ` Peter Stephenson
2013-08-28 13:38 ` René Neumann
2013-08-28 13:47 ` Peter Stephenson
2013-08-28 15:59 ` Bart Schaefer
2013-08-28 16:11 ` Peter Stephenson
2013-08-28 16:27 ` René Neumann [this message]
2013-08-29 0:20 ` 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=521E24F2.3000004@necoro.eu \
--to=lists@necoro.eu \
--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).