From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 558 invoked from network); 9 Jul 2009 19:56:37 -0000 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=AWL,BAYES_00 autolearn=ham version=3.2.5 Received: from new-brage.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.254.104) by ns1.primenet.com.au with SMTP; 9 Jul 2009 19:56:37 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 74602 invoked from network); 9 Jul 2009 19:56:31 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 9 Jul 2009 19:56:31 -0000 Received: (qmail 9119 invoked by alias); 9 Jul 2009 19:56:22 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27111 Received: (qmail 9098 invoked from network); 9 Jul 2009 19:56:20 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 9 Jul 2009 19:56:20 -0000 Received: from mtaout02-winn.ispmail.ntl.com (mtaout02-winn.ispmail.ntl.com [81.103.221.48]) by bifrost.dotsrc.org (Postfix) with ESMTP id DC3D680307FB for ; Thu, 9 Jul 2009 21:56:17 +0200 (CEST) Received: from aamtaout02-winn.ispmail.ntl.com ([81.103.221.35]) by mtaout02-winn.ispmail.ntl.com (InterMail vM.7.08.04.00 201-2186-134-20080326) with ESMTP id <20090709195613.YFHJ6611.mtaout02-winn.ispmail.ntl.com@aamtaout02-winn.ispmail.ntl.com> for ; Thu, 9 Jul 2009 20:56:13 +0100 Received: from pws-pc ([81.107.42.185]) by aamtaout02-winn.ispmail.ntl.com (InterMail vG.2.02.00.01 201-2161-120-102-20060912) with ESMTP id <20090709195613.CXNY21638.aamtaout02-winn.ispmail.ntl.com@pws-pc> for ; Thu, 9 Jul 2009 20:56:13 +0100 Date: Thu, 9 Jul 2009 20:56:08 +0100 From: Peter Stephenson To: zsh-workers@sunsite.dk Subject: Re: non-interactive set -m Message-ID: <20090709205608.52875b5f@pws-pc> In-Reply-To: References: <200907080858.n688wXfc030608@news01.csr.com> <200907081349.n68DneSv001850@news01.csr.com> X-Mailer: Claws Mail 3.7.1 (GTK+ 2.16.2; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Cloudmark-Analysis: v=1.0 c=1 a=9vXuR5GGAAAA:8 a=NLZqzBF-AAAA:8 a=_U0jKPw6ZDRUX0jf_BAA:9 a=WVwSotFjb-sIT1DzGr_gDYpVbPcA:4 a=eDFNAWYWrCwA:10 a=_dQi-Dcv4p4A:10 X-Virus-Scanned: ClamAV 0.94.2/9551/Thu Jul 9 15:22:08 2009 on bifrost X-Virus-Status: Clean On Thu, 9 Jul 2009 18:13:15 +0000 (UTC) Eric Blake wrote: > It may be that all you need to do is add a check in the code that tries to > manipulate the tty pgrp on completion of a monitored task to skip the > manipulation if the shell is not interactive. Here's my shot at that patch, > which passed the above test case for me (module the bug that fg still didn't > print anything to stdout), but I have no idea if it is doing the > correct thing. (This effectively disables attachtty() if non-interactive.) It seems entirely reasonable not to try to take over the terminal if you're in a shell that didn't think it was controlling the terminal in the first place. I'm not the job control expert, but since this doesn't affect the usual case anyway I've committed it. -- Peter Stephenson Web page now at http://homepage.ntlworld.com/p.w.stephenson/