From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10282 invoked by alias); 28 Aug 2013 16:27:50 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17952 Received: (qmail 16188 invoked from network); 28 Aug 2013 16:27:35 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at necoro.eu does not designate permitted sender hosts) Message-ID: <521E24F2.3000004@necoro.eu> Date: Wed, 28 Aug 2013 18:27:30 +0200 From: =?ISO-8859-1?Q?Ren=E9_Neumann?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130826 Thunderbird/17.0.8 MIME-Version: 1.0 To: zsh-users@zsh.org Subject: Re: Implicit killing of subprocesses References: <521DF308.4040106@necoro.eu> <20130828142651.4c930ba4@pwslap01u.europe.root.pri> <521DFD56.3040904@necoro.eu> <20130828144752.7986a138@pwslap01u.europe.root.pri> <130828085952.ZM24071@torch.brasslantern.com> <20130828171136.1c649660@pwslap01u.europe.root.pri> In-Reply-To: <20130828171136.1c649660@pwslap01u.europe.root.pri> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Am 28.08.2013 18:11, schrieb Peter Stephenson: > On Wed, 28 Aug 2013 08:59:52 -0700 > Bart Schaefer 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é