From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16746 invoked by alias); 11 Dec 2011 19:40:09 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 29999 Received: (qmail 27366 invoked from network); 11 Dec 2011 19:39:58 -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=-2.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.2 Received-SPF: neutral (ns1.primenet.com.au: 74.125.82.43 is neither permitted nor denied by SPF record at ntlworld.com) X-ProxyUser-IP: 86.6.29.42 Date: Sun, 11 Dec 2011 19:39:49 +0000 From: Peter Stephenson To: zsh-workers@zsh.org Subject: Re: Bug in sh emulation Message-ID: <20111211193949.2d58062b@pws-pc.ntlworld.com> In-Reply-To: <20111210232801.7dc8fef2@pws-pc.ntlworld.com> References: <111209184747.ZM5000@torch.brasslantern.com> <20111210194022.5051f91c@pws-pc.ntlworld.com> <20111210232801.7dc8fef2@pws-pc.ntlworld.com> X-Mailer: Claws Mail 3.7.9 (GTK+ 2.24.7; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Not so much a follow up as a separate point... If we're letting the subshell do job control (not resetting MONITOR in entersubsh() because POSIXJOBS is set), then presumably we shouldn't be resetting the signals that are special to shells that do job control? This actually makes the issue go away, but I'm not sure at all sure it's the basic issue; it's part of the stuff I'm hoping Mystified of Marin County might know a little more about. Having said that, the shell does make strenuous efforts to ignore these signals when doing job control, so I'm reasonable sure this is the right thing to do here. Index: Src/exec.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/exec.c,v retrieving revision 1.205 diff -p -u -r1.205 exec.c --- Src/exec.c 26 Oct 2011 18:48:13 -0000 1.205 +++ Src/exec.c 11 Dec 2011 19:32:17 -0000 @@ -959,7 +959,7 @@ entersubsh(int flags) if ((flags & ESUB_REVERTPGRP) && getpid() == mypgrp) release_pgrp(); shout = NULL; - if (isset(MONITOR)) { + if (isset(MONITOR) && !isset(POSIXJOBS)) { signal_default(SIGTTOU); signal_default(SIGTTIN); signal_default(SIGTSTP); -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/