From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16404 invoked from network); 8 Jul 2009 13:52:11 -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.4 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; 8 Jul 2009 13:52:11 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 78380 invoked from network); 8 Jul 2009 13:52:03 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 8 Jul 2009 13:52:03 -0000 Received: (qmail 15774 invoked by alias); 8 Jul 2009 13:51:53 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27100 Received: (qmail 15750 invoked from network); 8 Jul 2009 13:51:52 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 8 Jul 2009 13:51:52 -0000 Received: from cluster-g.mailcontrol.com (cluster-g.mailcontrol.com [208.87.233.190]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 0BB1580307FA for ; Wed, 8 Jul 2009 15:51:48 +0200 (CEST) Received: from cameurexb01.EUROPE.ROOT.PRI ([193.128.72.68]) by rly20g.srv.mailcontrol.com (MailControl) with ESMTP id n68Dn8Px016923 for ; Wed, 8 Jul 2009 14:51:43 +0100 Received: from news01.csr.com ([10.99.50.25]) by cameurexb01.EUROPE.ROOT.PRI with Microsoft SMTPSVC(6.0.3790.3959); Wed, 8 Jul 2009 14:49:41 +0100 Received: from news01.csr.com (localhost.localdomain [127.0.0.1]) by news01.csr.com (8.14.2/8.13.4) with ESMTP id n68DnflB001854 for ; Wed, 8 Jul 2009 14:49:42 +0100 Received: from csr.com (pws@localhost) by news01.csr.com (8.14.2/8.14.2/Submit) with ESMTP id n68DneSv001850 for ; Wed, 8 Jul 2009 14:49:41 +0100 Message-Id: <200907081349.n68DneSv001850@news01.csr.com> X-Authentication-Warning: news01.csr.com: pws owned process doing -bs To: zsh-workers@sunsite.dk Subject: Re: non-interactive set -m In-reply-to: References: <200907080858.n688wXfc030608@news01.csr.com> Comments: In-reply-to Eric Blake message dated "Wed, 08 Jul 2009 13:26:02 -0000." Date: Wed, 08 Jul 2009 14:49:40 +0100 From: Peter Stephenson X-OriginalArrivalTime: 08 Jul 2009 13:49:42.0008 (UTC) FILETIME=[F1B3D780:01C9FFD2] X-Scanned-By: MailControl A-09-20-00 (www.mailcontrol.com) on 10.71.0.130 X-Virus-Scanned: ClamAV 0.94.2/9546/Wed Jul 8 13:39:15 2009 on bifrost X-Virus-Status: Clean Eric Blake wrote: > POSIX requires that 'set -m'/'set -o monitor' be switchable on the fly Unfortunately I have limited time even for fixing real bugs in the shell, which was not originally designed to be a POSIX shell and is not your best bet if POSIX compatibility is your bottom line, and we have very few volunteers for fixing stuff in the core shell. So arguments of this kind on their own tend to fall a bit flat in these parts, for purely practical reasons (we're not actually against providing POSIX compatibility, of course). "It'll work if you change *this*" is a much more enticing argument... > And your claim that MONITOR > cannot be changed on the fly is false: zsh already handles this for > interactive shells You're right---there's another test of the same kind there (i.e. that we're interactive). This removes it. Let me know if you run up against more, or if there's some hidden interaction with the interactive/non-interactive mode (I wouldn't bet against it). I think the code that does the run-time switching is a late addition, but I haven't checked the history. Index: Src/init.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/init.c,v retrieving revision 1.101 diff -u -r1.101 init.c --- Src/init.c 1 Jul 2009 15:07:33 -0000 1.101 +++ Src/init.c 8 Jul 2009 13:36:58 -0000 @@ -486,7 +486,7 @@ * process group leader. */ mypid = (zlong)getpid(); - if (opts[MONITOR] && interact && (SHTTY != -1)) { + if (opts[MONITOR] && (SHTTY != -1)) { origpgrp = GETPGRP(); acquire_pgrp(); /* might also clear opts[MONITOR] */ } else Index: Src/options.c =================================================================== RCS file: /cvsroot/zsh/zsh/Src/options.c,v retrieving revision 1.48 diff -u -r1.48 options.c --- Src/options.c 3 Mar 2009 17:26:08 -0000 1.48 +++ Src/options.c 8 Jul 2009 13:36:58 -0000 @@ -730,7 +730,7 @@ } else if (!force && optno == MONITOR && value) { if (opts[optno] == value) return 0; - if (interact && (SHTTY != -1)) { + if (SHTTY != -1) { origpgrp = GETPGRP(); acquire_pgrp(); } else -- Peter Stephenson Software Engineer CSR PLC, Churchill House, Cambridge Business Park, Cowley Road Cambridge, CB4 0WZ, UK Tel: +44 (0)1223 692070