From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1867 invoked by alias); 12 Dec 2011 18:10:33 -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: 30015 Received: (qmail 3683 invoked from network); 12 Dec 2011 18:10:22 -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=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <111212101000.ZM1865@torch.brasslantern.com> Date: Mon, 12 Dec 2011 10:10:00 -0800 In-reply-to: <20111212160617.6ee3026c@pwslap01u.europe.root.pri> Comments: In reply to Peter Stephenson "Re: Bug in sh emulation" (Dec 12, 4:06pm) References: <111209184747.ZM5000@torch.brasslantern.com> <20111210194022.5051f91c@pws-pc.ntlworld.com> <20111210232801.7dc8fef2@pws-pc.ntlworld.com> <20111211193949.2d58062b@pws-pc.ntlworld.com> <20111211202024.07c046df@pws-pc.ntlworld.com> <20111211205658.365243c7@pws-pc.ntlworld.com> <111211153918.ZM32739@torch.brasslantern.com> <20111212100100.0696825b@pwslap01u.europe.root.pri> <111212074417.ZM1511@torch.brasslantern.com> <20111212160617.6ee3026c@pwslap01u.europe.root.pri> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: Subject: Re: Bug in sh emulation MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Dec 12, 4:06pm, Peter Stephenson wrote: } } I think this must be OK (unless, of course, something is failing where I } don't see it). The chunk of code in entersubsh() we've been staring at } is the one that's only executed if there's no group leader, and in that } case it creates its own process group and attaches that to the tty Right. My lingering doubt is that "no group leader" doesn't necessarily mean "no other group attached to the tty", if we've been given some wacky structure like (emulate sh -c "(foo | bar)" | emulate zsh -c "(baz | ding)") | read -E However, I can't actually construct a real example that I think would fail, so we should probably go with your patches so far.