From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15146 invoked from network); 27 Sep 2003 21:00:59 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 27 Sep 2003 21:00:59 -0000 Received: (qmail 177 invoked by alias); 27 Sep 2003 21:00:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 19148 Received: (qmail 163 invoked from network); 27 Sep 2003 21:00:50 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 27 Sep 2003 21:00:50 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [4.3.58.249] by sunsite.dk (MessageWall 1.0.8) with SMTP; 27 Sep 2003 21:0:50 -0000 Received: (from schaefer@localhost) by candle.brasslantern.com (8.11.6/8.11.6) id h8RL0mE10387 for zsh-workers@sunsite.dk; Sat, 27 Sep 2003 14:00:48 -0700 From: Bart Schaefer Message-Id: <1030927210048.ZM10386@candle.brasslantern.com> Date: Sat, 27 Sep 2003 21:00:48 +0000 In-Reply-To: <87fziiq5ke.fsf@ceramic.fifi.org> Comments: In reply to Philippe Troin "Re: Subshell exiting, suspend problem" (Sep 26, 8:21pm) References: <20030926165251.GA14940@clipper.ens.fr> <1030926173854.ZM8282@candle.brasslantern.com> <87fziiq5ke.fsf@ceramic.fifi.org> X-Mailer: Z-Mail (5.0.0 30July97) To: zsh-workers@sunsite.dk Subject: Re: Subshell exiting, suspend problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Sep 26, 8:21pm, Philippe Troin wrote: } } AFAIR, SIGHUP only gets sent to all members of a session when the } session leader exits. It is not related to process groups. It depends on the antiquity of your operating system, actually. There is AFAIK no distinction between sessions and process groups in some versions of unix (i.e., a session is a process group that has a TTY). I forget when setsid() et al. were introduced, but it is not universal to all OSs on which zsh compiles. } So acquire/release_pgrp() are irrelevant in this instance since these } background jobs are part of the same session. That may be true for the HUP on session leader exit, but what about e.g. TSTP when the user types ^Z, or INT on ^C ? E.g. if bash starts mutt which starts zsh which starts vi, and then the user types ^Z, I believe it should be up to mutt to have placed zsh in its own process group if mutt did not want the TSTP. In this case I don't think zsh has any business forcing itself to be the group leader, even if it is interactive. However, there are enough programs that don't pay attention to this detail when spawning a child process that it may be preferable for zsh to ignore this philosophical nicety, especially when job control is enabled. } How is the situation you describe different from (say) a subshell } spawned from zsh directly? Depends what you mean by a "subshell" -- I prefer to restrict that term to the shell syntactic construct of placing a command in parens, not to explicitly starting a new shell by name from the prompt of another. -- 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