From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 19639 invoked from network); 13 Jul 2009 01:48:47 -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=BAYES_00,UNPARSEABLE_RELAY 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; 13 Jul 2009 01:48:47 -0000 Received-SPF: none (ns1.primenet.com.au: domain at sunsite.dk does not designate permitted sender hosts) Received: (qmail 61104 invoked from network); 13 Jul 2009 01:48:41 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 13 Jul 2009 01:48:41 -0000 Received: (qmail 27001 invoked by alias); 13 Jul 2009 01:48:31 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 27144 Received: (qmail 26976 invoked from network); 13 Jul 2009 01:48:30 -0000 Received: from bifrost.dotsrc.org (130.225.254.106) by sunsite.dk with SMTP; 13 Jul 2009 01:48:30 -0000 Received: from ciao.gmane.org (main.gmane.org [80.91.229.2]) by bifrost.dotsrc.org (Postfix) with ESMTPS id 6F5C280307FA for ; Mon, 13 Jul 2009 03:48:27 +0200 (CEST) Received: from list by ciao.gmane.org with local (Exim 4.43) id 1MQAeY-0001RE-LR for zsh-workers@sunsite.dk; Mon, 13 Jul 2009 01:48:26 +0000 Received: from c-24-10-247-15.hsd1.ut.comcast.net ([c-24-10-247-15.hsd1.ut.comcast.net]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2009 01:48:26 +0000 Received: from ebb9 by c-24-10-247-15.hsd1.ut.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Mon, 13 Jul 2009 01:48:26 +0000 X-Injected-Via-Gmane: http://gmane.org/ To: zsh-workers@sunsite.dk From: Eric Blake Subject: Re: non-interactive set -m Date: Mon, 13 Jul 2009 01:48:15 +0000 (UTC) Message-ID: References: <200907121935.n6CJZ5K0018519@pws-pc.ntlworld.com> <090712141900.ZM14558@torch.brasslantern.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: usenet@ger.gmane.org X-Gmane-NNTP-Posting-Host: main.gmane.org User-Agent: Loom/3.14 (http://gmane.org/) X-Loom-IP: 24.10.247.15 (Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.16) Gecko/20080702 Firefox/2.0.0.16 Mnenhy/0.7.5.666) Sender: news X-Virus-Scanned: ClamAV 0.94.2/9557/Sun Jul 12 22:01:16 2009 on bifrost X-Virus-Status: Clean Bart Schaefer brasslantern.com> writes: > } > Note that in pdksh the job in the subshell is added to the table of > } > jobs inherited from the parent shell (testing with pdksh 5.2.14). > } > } Yuk. So you've got a real job you can manipulate, and one phantom job > } from the parent shell you can't and which is presumably fixed like that > } for eternity. > > No, actually, you have two jobs neither of which you can manipulate. > PDKSH doesn't do job control in subshells. It turns off -m when the > subshell starts, and silently ignores it if you manually turn it back > on again. My opinion is that pdksh is somewhat buggy when it comes to job handling, and that you are better off trying to emulate David Korn's ksh93 than the buggy pdksh; other better examples are dash and bash. I already quoted the parts of POSIX that mention that subshells inherit the same options as the parent (so the pdksh behavior of silently disabling -m in a subshell violates that rule). -- Eric Blake