From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25516 invoked by alias); 23 Apr 2015 20:13:42 -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: 34951 Received: (qmail 16496 invoked from network); 23 Apr 2015 20:13:37 -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 X-Originating-IP: [80.3.228.158] X-Spam: 0 X-Authority: v=2.1 cv=RcseCjdv c=1 sm=1 tr=0 a=P+FLVI8RzFchTbbqTxIDRw==:117 a=P+FLVI8RzFchTbbqTxIDRw==:17 a=kj9zAlcOel0A:10 a=NLZqzBF-AAAA:8 a=q2GGsy2AAAAA:8 a=TB-y21AllBf296DnsSMA:9 a=CjuIK1q_8ugA:10 Date: Thu, 23 Apr 2015 21:13:31 +0100 From: Peter Stephenson To: "Zsh Hackers' List" Subject: Re: Using "source" in a function breaks job control Message-ID: <20150423211331.5ea4baf0@ntlworld.com> In-Reply-To: <150422215539.ZM14251@torch.brasslantern.com> References: <5537E450.9060205@thequod.de> <20150422222627.1f6154e9@ntlworld.com> <150422215539.ZM14251@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 22 Apr 2015 21:55:39 -0700 Bart Schaefer wrote: > It has something to do with tracking the job table. Looks like we lost STAT_SUPERJOB in the flags of the job that got created when we forked. In the bad case the STAT_ flags are SUBLEADER|CURSH|INUSE|LOCKED and in the good case there is also SUPERJOB. The SUBLEADER in the bad case means that the logic was probably on roughly the right lines, though that's not a great surprise since we can see the forked subshell is there. SUPERJOB can only get added at one point in execpline(), although it can also be removed but in that case the job should get WASSUPER which doesn't get removed until the job is cleared. So the differences in execpline(), which I never understood, might be informative. pws