From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14533 invoked from network); 7 Dec 2002 17:44:00 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 Dec 2002 17:44:00 -0000 Received: (qmail 11733 invoked by alias); 7 Dec 2002 17:43:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 17989 Received: (qmail 11703 invoked from network); 7 Dec 2002 17:43:51 -0000 From: "Bart Schaefer" Message-Id: <1021207174323.ZM11632@candle.brasslantern.com> Date: Sat, 7 Dec 2002 17:43:23 +0000 In-Reply-To: <20021207152412.GA15901@dman.com> Comments: In reply to Clint Adams "Re: GNU nohup oddness" (Dec 7, 10:24am) References: <20021206003013.GA10400@dman.com> <1021206101446.ZM10013@candle.brasslantern.com> <20021207152412.GA15901@dman.com> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: GNU nohup oddness Cc: 171716@bugs.debian.org, phil@fifi.org MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Dec 7, 10:24am, Clint Adams wrote: } Subject: Re: GNU nohup oddness } } > (3) In Src/init.c:init_signals(), zsh explicitly installs a SIGHUP } > handler, even in non-interactive shells. It has done so for a } > very long time -- as far back as recorded in my CVS of 3.0.x, } > which means prior to 27-Jun-97. } } So is this the right thing to do? [Patch moves install_handler(SIGHUP) call to `if (interact)' block] I'm not certain. Probably more correct would be something like: @@ -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); Or maybe even: @@ -870,7 +897,10 @@ signal_ignore(SIGQUIT); #endif - install_handler(SIGHUP); + if (signal_ignore(SIGHUP) == SIG_IGN) + opts[HUP] = 0; + else + install_handler(SIGHUP); install_handler(SIGCHLD); #ifdef SIGWINCH install_handler(SIGWINCH); Does anybody else have an opinion? -- 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