From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43405-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIMWL_WL_MED autolearn=ham autolearn_force=no version=3.4.1 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id 67b92e3f for ; Fri, 7 Sep 2018 03:18:37 +0000 (UTC) Received: (qmail 24190 invoked by alias); 7 Sep 2018 03:18:23 -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: List-Unsubscribe: X-Seq: 43405 Received: (qmail 2928 invoked by uid 1010); 7 Sep 2018 03:18:23 -0000 X-Qmail-Scanner-Diagnostics: from mail-lf1-f42.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.167.42):SA:0(-1.9/5.0):. Processed in 3.427133 secs); 07 Sep 2018 03:18:23 -0000 X-Envelope-From: schaefer@brasslantern.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=brasslantern-com.20150623.gappssmtp.com; s=20150623; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=Yy1hAOvS6vVNxSoZVB5sjx7LXVANONpVeEIkTYeEmys=; b=aHmKHEtx9bUQ4lrdIMz0GyTTF3Fjk+XNjACAufZFcrXIhK3nXpxyionM/FSEX9sQNO xXO9mnY+U2gFE7R8PYWxd3rlBngJc5jEdRCCMzjwr4A6KIX/pBfLxYxFhJ/K8DWO/6IT prrFtfKiwJiGDT9aaRb29uADHjLmfNf5mKxFbbzJRCAq58Hg8CGrcJ6uDxG0d475hnDT ZILLQYNl0UNF27iLJFY6CSCdO6OB0gYWhqMYbWDoBDDs8DGG8MbCqg/eArWo1rlJUZjU ZdEguHbDPE088UrQacOqTTtgwm6rbl4KQ0o5SiulD1wBAOZYSKB8plf4YNU3nc5axQpU zG9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=Yy1hAOvS6vVNxSoZVB5sjx7LXVANONpVeEIkTYeEmys=; b=HFuLnyj0IPAqqojkYF8G4Kyd1tyGqYDBN6/7Em/2OcEErHUIurZ+5ie+S/XcuvWGcg Hw0GaMD2ORxxTa2YM8At5K32RWpjPtdidg3MXmxnqX7w3ce28jyCCAHf7Y0ixrDmv9cy x1v9seEHJDILNa9AUjhmtcjO2zEjYSnpmY0gfZQt95aofC3tQ17rkBeNX7qqRu5xhRpX O2fTYjgSJEHGJbGZRjcfg0ST3I910EAO/ynNJhM//Hc2iuh3gkEFNtNOXbfRypTNEX9l Gj0vrDl7KAjXa083TxIP9SlDOOLC42g+dgL9mg48sYgdHqVuf6LWdA7DYkJPk6RyzGur oL4g== X-Gm-Message-State: APzg51AnMxWytKA2qTq4zdlWmEzQQSVRYE+Y7MPquB9Bd5GRzOWdp5sH ijpmgDdQ3aPGLTXw2BbguwoGwDMGwwKzeOCbvvI3VHQfpDQ= X-Google-Smtp-Source: ANB0VdaBeM+GROxBxH+g9pup6wmpY8R8Ysfjzo0zfJLSCF5VpS+P04jGj2tU4p9xfqxztXxKWB1RlUXR3swVj++JvtE= X-Received: by 2002:a19:6756:: with SMTP id e22-v6mr3516194lfj.54.1536290295620; Thu, 06 Sep 2018 20:18:15 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <20180906092250eucas1p13d651e07ae627d179dd0701e65f912d6~RxTLztJrP2263722637eucas1p12@eucas1p1.samsung.com> References: <20180905210740.5a6aec15@pws-HP.localdomain> <20180906090902.1f344e9f@camnpupstephen.cam.scsc.local> <20180906092250eucas1p13d651e07ae627d179dd0701e65f912d6~RxTLztJrP2263722637eucas1p12@eucas1p1.samsung.com> From: Bart Schaefer Date: Thu, 6 Sep 2018 20:18:14 -0700 Message-ID: Subject: Re: PATCH: job control debug To: Peter Stephenson Cc: Zsh hackers list Content-Type: text/plain; charset="UTF-8" On Thu, Sep 6, 2018 at 2:22 AM, Peter Stephenson wrote: > Typo fixed, now with setpgrp debugging. > > Starting to think the key difference may be set_gleader(11) --- transfer > of job ownership on exit, which happens too early for that to be > possible in the bad case. I don't think that can be it, at least not directly. set_gleader() only updates internal data structures. Something has to be either changing the tty process group too soon, or not soon enough, in order for a TTOU signal to be sent. The other possibility is that in the "good" case the TTOU is sent but the process is ignoring it, whereas in the bad case the process is allowing it. You may need to add some debugging for that. In particular entersubsh() does some juggling of SIGTTOU -- which I think predates this bug appearing, but there may be an interaction of that with some later change.