From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-return-43589-ml=inbox.vuxu.org@zsh.org X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.2 Received: from primenet.com.au (ns1.primenet.com.au [203.24.36.2]) by inbox.vuxu.org (OpenSMTPD) with ESMTP id c17b6cd2 for ; Tue, 2 Oct 2018 15:32:28 +0000 (UTC) Received: (qmail 28627 invoked by alias); 2 Oct 2018 15:32:17 -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: 43589 Received: (qmail 23243 invoked by uid 1010); 2 Oct 2018 15:32:17 -0000 X-Qmail-Scanner-Diagnostics: from mailout1.w1.samsung.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(210.118.77.11):SA:0(-6.9/5.0):. Processed in 2.089078 secs); 02 Oct 2018 15:32:17 -0000 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20181002153210euoutp0141dfb7a9e44e2a832e1942cb49ffd89c~Z1HFSg-e40592805928euoutp01I DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1538494330; bh=QlABX6OpfDuzCZZJ1R3yvUW7lL4p/baxsfkhWF8Gbnc=; h=Date:From:To:Subject:In-Reply-To:References:From; b=jfv6tLeReM8UxzJXJTjUTffkqwHzd2euoeb5eqnAXaCtHHqFajP2Sf/lrhG2eQVtN Hw1vZNOyWHEeAWITqYZGJlTbtqR/c8P1DD5oWMISRSCPiP91MQ53Dpyi/juuAYd7Mi oRvZVxt9ye0M9V/Ypo5BBy6ggaBV0HGrk6BxiShM= X-AuditID: cbfec7f5-34dff700000012c6-37-5bb38f7a9cdf Date: Tue, 2 Oct 2018 16:32:07 +0100 From: Peter Stephenson To: Zsh Hackers List Subject: Re: long-standing tty related issue: wrapped Emacs not suspended In-Reply-To: <20180926161708.39be6402@camnpupstephen.cam.scsc.local> Organization: SCSC X-Mailer: Claws Mail 3.13.2 (GTK+ 2.24.30; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrHIsWRmVeSWpSXmKPExsWy7djPc7pV/ZujDaZd4rA42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGT8Wf2UqeMZd0bhvG0sD43mOLkZODgkBE4kFf+ewdzFycQgJ rGCU2H/sHyuE08ckMeHtcyinl0ni1ocTzDAt7/acZYZILGeU2DThDBtc1dTWC1DOaUaJ1htH mEBahATOM0pc7IzvYuTgYBFQkTjyWxMkzCZgKDF102xGEFtEQEti9+WVLCC2sICnxPfPv1lB bE4BF4mnd5uYQFr5BYQkLjTbQhxhL3F0z0mw6bwCghInZz4Ba2UWkJfY/nYO2HESAt/ZJHrX fGeGKCqTOPtxJhNEs4vEwQmXGCFsYYlXx7ewQ9gyEqcn97BANLczSqyZ9JodwukBevPoHagO a4m+2xcZQS5iFtCUWL9LHyLsKHH86kpWkLCEAJ/EjbeCEAfxSUzaNp0ZIswr0dEmBFGtJrGj aSvjBEblWUhemIXkhVkI8xcwMq9iFE8tLc5NTy02zkst1ytOzC0uzUvXS87P3cQITAWn/x3/ uoNx35+kQ4wCHIxKPLwM8puihVgTy4orcw8xSnAwK4nw9iVujhbiTUmsrEotyo8vKs1JLT7E KM3BoiTOu2zexmghgfTEktTs1NSC1CKYLBMHp1QDo+t72wX31UPdqj0WaQkJSu3zW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7KDEc3130531305eucas1p19@eucas1p1.samsung.com> X-CMS-MailID: 20181002153209eucas1p180cad5f0c149b14bf8681f9c92c5e7ed X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20180924200327epcas5p16c59687fb2a9ac2ea8919ceab7705c02 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180924200327epcas5p16c59687fb2a9ac2ea8919ceab7705c02 References: <20180920123005.GA20647@zira.vinc17.org> <20180921175740.6ab97a81@pws-HP.localdomain> <20180924205106.03ee3da6@pws-HP.localdomain> <20180925103759eucas1p2a15709c7a9d8df72d8c390521a6999ab~XnlOUhOUG3250532505eucas1p2u@eucas1p2.samsung.com> <20180926161708.39be6402@camnpupstephen.cam.scsc.local> I've been thinking about this tweak for a week and I'll forget about it if I don't do it now. Instead of reporting the superjob state when we have a subjob only when the subjob is suspended, report it any time the subjob still has processes, as these are the things that the user is interested in until the subjob exits. So if a superjob is suspended but a subjob isn't, as far as the user is concerned everything is ticking along. "It's hard to see how this can be wrong." --- me pws diff --git a/Src/jobs.c b/Src/jobs.c index 8103f5c..ec6d629 100644 --- a/Src/jobs.c +++ b/Src/jobs.c @@ -1060,17 +1060,13 @@ printjob(Job jn, int lng, int synch) jn->other) { Job sjn = &jobtab[jn->other]; - if (sjn->stat & STAT_STOPPED) + if (sjn->procs || sjn->auxprocs) { /* - * A subjob is stopped, which will prevent further excution - * of the superjob, which the user wants to know about. So - * report the status of the subjob as if it were the - * user-visible superjob. - * - * TBD: there may be other times we want to do this - * which would, for example, remove the need for the - * hack at the top of the loop over processes just below. + * A subjob still has process, which must finish before + * further excution of the superjob, which the user wants to + * know about. So report the status of the subjob as if it + * were the user-visible superjob. */ jn = sjn; }