From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 27359 invoked from network); 12 Dec 2002 04:09:40 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 12 Dec 2002 04:09:40 -0000 Received: (qmail 10595 invoked by alias); 12 Dec 2002 04:09:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 18000 Received: (qmail 10568 invoked from network); 12 Dec 2002 04:09:33 -0000 From: "Bart Schaefer" Message-Id: <1021212040902.ZM23331@candle.brasslantern.com> Date: Thu, 12 Dec 2002 04:09:02 +0000 In-Reply-To: <23159.1039456820@csr.com> Comments: In reply to Peter Stephenson "Re: GNU nohup oddness" (Dec 9, 6:00pm) References: <23159.1039456820@csr.com> X-Mailer: Z-Mail (5.0.0 30July97) To: Peter Stephenson , zsh-workers@sunsite.dk Subject: Re: GNU nohup oddness MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 9, 6:00pm, Peter Stephenson wrote: } Subject: Re: GNU nohup oddness } } "Bart Schaefer" wrote: } > @@ -870,7 +897,8 @@ } > signal_ignore(SIGQUIT); } > #endif } > } > - install_handler(SIGHUP); } > + if (signal_ignore(SIGHUP) != SIG_IGN) } > + install_handler(SIGHUP); } > install_handler(SIGCHLD); } > #ifdef SIGWINCH } > install_handler(SIGWINCH); } } Seems to be logical --- follow the parent process. } } Is there a place where also setting opts[HUP] to zero would change the } effect? With signal_ignore(SIGHUP) any jobs started by that zsh _probably_ will also ignore HUP -- but without opts[HUP] = 0, zsh still kill()s all jobs at exit. So with the patch above, background jobs _may_ die when the script exits, even if the nohup wrapper was used to start the script. Conversely, if opts[HUP] = 0, then zsh won't kill() even if the script later un-ignores HUP by installing a trap handler, so background jobs started by the script will survive even if the script itself is HUP'd. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net