From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20319 invoked by alias); 28 Aug 2013 16:21:51 -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: 17951 Received: (qmail 26997 invoked from network); 28 Aug 2013 16:21:45 -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=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at samsung.com does not designate permitted sender hosts) X-AuditID: cbfec7f5-b7ef66d00000795a-36-521e2139dfd8 Date: Wed, 28 Aug 2013 17:11:36 +0100 From: Peter Stephenson To: zsh-users@zsh.org Subject: Re: Implicit killing of subprocesses Message-id: <20130828171136.1c649660@pwslap01u.europe.root.pri> In-reply-to: <130828085952.ZM24071@torch.brasslantern.com> 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> Organization: Samsung Cambridge Solution Centre X-Mailer: Claws Mail 3.7.9 (GTK+ 2.22.0; i386-redhat-linux-gnu) MIME-version: 1.0 Content-type: text/plain; charset=US-ASCII Content-transfer-encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFuplluLIzCtJLcpLzFFi42I5/e/4ZV1LRbkgg38nNS12nFzJ6MDoserg B6YAxigum5TUnMyy1CJ9uwSujL+XdzAW7GStOLjkFlMD43yWLkZODgkBE4lja/czQthiEhfu rWfrYuTiEBJYyiixa90tGIdJYsL92ewgVSwCqhLr/oBUcXKwCRhKTN00G6xbREBUYvmKzWA1 wgK6EpfPN4HV8ArYSzS0vADbxilgJdH6ZhVYjZDAY0aJvy/jQWx+AX2Jq38/MUFcYS8x88oZ RoheQYkfk++B9TILaEls3tbECmHLS2xe85Z5AqPALCRls5CUzUJStoCReRWjaGppckFxUnqu kV5xYm5xaV66XnJ+7iZGSBB+3cG49JjVIUYBDkYlHl6Gn7JBQqyJZcWVuYcYJTiYlUR4f4vI BQnxpiRWVqUW5ccXleakFh9iZOLglGpg3HX61vmJS1jkUp+/C/wmL7hq6rwHJza9m/NOfrrv Jv2uy+8qtpfHVmmfL1mwOfCqXAbbHWe1KU4VJtW+V5ROCXtqOH5ueut9zn7ByodmL1PX2Zdw hSQZ3AgrVrpb/PbK3/2udwoa9Z4vWc/wuZg/5/Iexgnzf/EfWsR99C/LLf/D7xoWxSw80a/E UpyRaKjFXFScCAAPZTU9IAIAAA== 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 } pws