From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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=DKIMWL_WL_HIGH,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 5ee8ab46 for ; Tue, 12 Feb 2019 18:35:52 +0000 (UTC) Received: (qmail 14971 invoked by alias); 12 Feb 2019 18:35:41 -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: 44063 Received: (qmail 16670 invoked by uid 1010); 12 Feb 2019 18:35:41 -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.100.2/25112. spamassassin: 3.4.2. Clear:RC:0(210.118.77.11):SA:0(-7.0/5.0):. Processed in 3.898562 secs); 12 Feb 2019 18:35:41 -0000 X-Envelope-From: p.stephenson@samsung.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.samsung.com designates 210.118.77.11 as permitted sender) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20190212183500euoutp014b839edd69baa2256e20ac894ca4d48a~CsZr8Heuq0528705287euoutp01x DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1549996501; bh=14y6DhlTsOWBDTh7GYQhetac+qGHyLqbNaNtj2FCxTQ=; h=Subject:From:To:Date:In-Reply-To:References:From; b=WCglpIS5zNuf7oPCfG8BAWdO+eJ/AbTtONSMO+2IiSHEf94MECu8zBFGRj2Cncn8g ewCFekLiBIQphTaKzsB9SlYQfHvU32T1XLPTr7kj+a2sVgRRqapyIm6ud1rMUTlVt9 nP4ckTPoxSnv5Y4FuIIcf5QEXhISvLruq4DYNyIQ= X-AuditID: cbfec7f2-5e3ff70000001159-d7-5c6311d435b3 Message-ID: <1549996497.5237.4.camel@samsung.com> Subject: Re: Ignoreeof warning message regression From: Peter Stephenson To: Date: Tue, 12 Feb 2019 18:34:57 +0000 In-Reply-To: X-Mailer: Evolution 3.18.5.2-0ubuntu3.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFnrPIsWRmVeSWpSXmKPExsWy7djP87pXBJNjDC7OELM42PyQyYHRY9XB D0wBjFFcNimpOZllqUX6dglcGYvfzmAv+M5fsfL4H/YGxo88XYycHBICJhKHP9xj6WLk4hAS WMEo0f/xADOE08cksWDvblYIp5dJou0BSAai5dHke4wgtpDAckaJm9914YomL1/NCOGcYZT4 /msClHOBUeLZhBVsIC28AoYS9zs/MYHYwkD2lgO3wMayAdlTN80GGysiIClxrfk0mM0ioCrx uWsdmM0pECix/E0nK8QZGhIbbh5jgpgpKHFy5hMWEJtZQF6ieetssCckBO6zSax92ADV4CLR +2EuI4QtLPHq+BZ2CFtG4vTkHhaIhnZGiTWTXrNDOD2MEpuO3oHqsJbou30RyOYAWqEpsX6X PkTYUWLT9N/sIGEJAT6JG28FIY7gk5i0bTozRJhXoqNNCKJaTWJH01ZGiLCMxNM1ChMYlWYh +WAWkg9mIaxawMi8ilE8tbQ4Nz212DAvtVyvODG3uDQvXS85P3cTIzAZnP53/NMOxq+Xkg4x CnAwKvHwrjiaFCPEmlhWXJl7iFGCg1lJhDeNOTlGiDclsbIqtSg/vqg0J7X4EKM0B4uSOG81 w4NoIYH0xJLU7NTUgtQimCwTB6dUA+Pyj8saJz8/w9p32q7Q2eLi4vLKjhDtTzM6X/z5Ib/4 D8O8mJ+2grluPW7drgdkfd0WT5e69EPmm6fVvBtZ4kkXTsnE186u9WYWqTQQZG84IchmHbQ+ pjuc4e6Cq5lbVSeEPrPhXf9jxnHv95/mLDjy2vP7tmX9ju3cuYdF4j4tZP81NfHO/hAlluKM REMt5qLiRACsXyiWAgMAAA== X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFmpikeLIzCtJLcpLzFFi42I5/e/4Pd1LgskxBkf3W1ocbH7I5MDoserg B6YAxig9m6L80pJUhYz84hJbpWhDCyM9Q0sLPSMTSz1DY/NYKyNTJX07m5TUnMyy1CJ9uwS9 jMVvZ7AXfOevWHn8D3sD40eeLkZODgkBE4lHk+8xdjFycQgJLGWUeLp8OTtEQkbi05WPULaw xJ9rXWwgtpBAN5PEl5umEA1nGCVOHJvNBuFcYJS4cWEfWAevgKHE/c5PTCC2MJC95cAtZhCb Dcieumk2I4gtIiApca35NJjNIqAq8blrHZjNKRAosfxNJyvcSR2N7awgCWYBTYnW7b+hTtKQ 2HDzGBPEMkGJkzOfsEDUyEs0b53NPIFRaBaSlllIymYhKVvAyLyKUSS1tDg3PbfYUK84Mbe4 NC9dLzk/dxMjMPy3Hfu5eQfjpY3BhxgFOBiVeHhXHE2KEWJNLCuuzD3EKMHBrCTCm8acHCPE m5JYWZValB9fVJqTWnyI0RToo4nMUqLJ+cDYzCuJNzQ1NLewNDQ3Njc2s1AS5z1vUBklJJCe WJKanZpakFoE08fEwSnVwCiwUO+S1mQ+44w1mmxrp9++veUGF9eVq7l2ajG9fkJnJXW2n/X/ VHVpz8fTXi1fS95d/nc7pE705Ftu45WRmn/X71e86F/38OaM4yuFjkivfHBkycOtqes0X/DM tkpbpDA9f+aszqRTUmtqrd7kPg1hMLtxaz736t+OC5803Lrd7Hz5wEXmNwIblFiKMxINtZiL ihMBBkFixJUCAAA= X-CMS-MailID: 20190212183459eucas1p2b0afc1de7da82e8235d9ed0c279a480c X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20190212174900epcas1p2f71b5f3bafef8ad73a95c1cdb1bf5f8c X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20190212174900epcas1p2f71b5f3bafef8ad73a95c1cdb1bf5f8c References: On Tue, 2019-02-12 at 09:47 -0800, David Bohman wrote: > This is an old regression, which apparently occurred between release 5.3.1 > and 5.4 of zsh. >  > If you have the ignoreeof option set, and type a CTL-D to the shell, you > are supposed to get a warning message: >  > zsh: use 'exit' to exit. >  > Instead, a blank line is emitted. This was introduced by > commit 34656ec2f00d6669cef56afdbffdd90639d7b465, specifically the change to > Src/Zle/zle_main.c. >  > The problem occurs both on Ubuntu 18.04.1 running zsh 5.4.2 and macOS > 10.12.6 running 5.4 forwards to 5.7.1. Stock macOS 10.12.6 contains zsh 5.2 > and does not manifest the bug. >  > The problem disappears when the change to Src/Zle/zle_main.c is backed out. Yes.  In this case we do need to remember the state of the command line when we return to ZLE after passing nothing-very-much back to the main shell --- the ^D was ignored but we told the main shell about it anyway, then came back into ZLE expecting to pick up exactly where we left off, meaning we shouldn't clear the message we printed and that the main shell we briefly returned to knows nothing about...  It's not at all clear that's sensible behaviour but refactoring the states of ZLE is probably beyond anyone's capabilities at this point. The original fix is here (zsh-workers/40305): http://www.zsh.org/mla/workers/2017/msg00053.html I'm not sure the change to zle_main.c there is the key one for the fix as a whole --- backing it off doesn't appear to make the specific problem (not the originally reported one in that thread) being addressed there fail, and it may be the associated change to clearflag in zle_refresh.c was the key one. However, as there were various related issues associated with asynchrohonous behaviour, it's hard to be sure. In the absence of a test suite for this sort of not only interactive but asynchronous behaviour (zpty is way out of its depth here), I'm tempted to make that change and see what happens. pws