From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-3.4 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FROM,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 1645 invoked from network); 22 Oct 2021 10:29:25 -0000 Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368) by inbox.vuxu.org with ESMTPUTF8; 22 Oct 2021 10:29:25 -0000 ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1634898565; b=T1vLmCxuhkFNby/D1MljNNZAN7iYj/z431kbgFm4Vvhk3JsqiVDx7mN3TvgaPo9nqIc0JUIrPM hkg39mWwIBUwM5i0AK6mNWblpS2qAiSIXsO6O2LV3ATl7lf7hsO4le3D5NSn+4KLumN3OQmLVU 52QFyC3Bd5PZG/kSmYPP8+cn5FaCb6ecsQdXZhmym5j5fZuer/CCxLDTEos1q6Ql++hDqAsjhG 5zQB6eIct06RdF/Px8iDsEvjO7odgWyE7Y7WAVbIvZyhZPSYze3bndJ/7zsLRkmBJdUynUZXnO GEe5WEee7gHJEwUWgRmbZdNf3u2xFGo8E8spSH2j//EtMg==; ARC-Authentication-Results: i=1; zsh.org; iprev=pass (shout01.mail.de) smtp.remote-ip=62.201.172.24; dkim=pass header.d=mail.de header.s=mailde202009 header.a=rsa-sha256; dmarc=pass header.from=mail.de; arc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1634898565; bh=3zuGksCjby9YEc2gtq9MRBnkBavek9muxWyxI+3pCmU=; h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help: List-Id:Sender:Content-Transfer-Encoding:Content-Type:In-Reply-To: MIME-Version:Date:Message-ID:From:References:Cc:To:Subject:DKIM-Signature: DKIM-Signature; b=jpn0iZpzdUXKzdlAqjF9/mW7Wsv6jPwJUlOwqap2Mw0WEmQhtYFvfIuwpLLWuk6YZsIYMh45r3 9X4GXySu93X0NpcqznXsOg/H3BCMIG7CaDHVtUhG4KkNNHIyBeZZJdgyMjkHq1crWe6e4OshPo mbGTZgNlNDe0sEzMwqp8KAap5/hgSQrv7pYBtXnT0g5axvOTQ1kMpykI8g8qWyh+muNvY6j2Jl 97l0ar3pJxZmpGu6E57jS7FlpmqDmpjbuIgUtRRcYQkPD9uX6K+FEVf0mDNQzfCm+SOSvj04A6 7XWvfBFdMFzmljxyCZai5aTM3JeNEE1gLJV0R62cXtk2/g==; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=zsh.org; s=rsa-20210803; h=List-Archive:List-Owner:List-Post:List-Unsubscribe: List-Subscribe:List-Help:List-Id:Sender:Content-Transfer-Encoding: Content-Type:In-Reply-To:MIME-Version:Date:Message-ID:From:References:Cc:To: Subject:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID; bh=SexR8DszN2PWDjy4ds8kXQ+sydb2hvw2SQKRA53Rt0s=; b=hrvER09GkWHutLPdEhRKSuIjgX rmyNHcQVhJJhV9A1oAjXP+PKJBBaCm4yOcbKXS8AGT7KihqI28QXZHRwk9d7AG94Cz8i2jlnzowIK WjmlIAiEbYR5p0yz9fR2SwBRAE06G0LmMmbNYMxCceTurKu/LUcjZPgpD75M8LcXTcRvdQ7bZ63nb W7LVIpUE06+ttqWl8HiIhPwJyAO2vBiCe6jcbG6Lx1YJvqbbVDg9z3QCiJFU0R0LCDrnXUkky3eas gwVnl07fUSAx2wXQgqjdM1rpwRRpJ0S1nSCbPQchfbO85ziZ1lwCxdzOFP3OCMD+QXSEd1djas20y mFwTIPbQ==; Received: from authenticated user by zero.zsh.org with local id 1mdrng-000JrJ-CJ; Fri, 22 Oct 2021 10:29:24 +0000 Authentication-Results: zsh.org; iprev=pass (shout01.mail.de) smtp.remote-ip=62.201.172.24; dkim=pass header.d=mail.de header.s=mailde202009 header.a=rsa-sha256; dmarc=pass header.from=mail.de; arc=none Received: from shout01.mail.de ([62.201.172.24]:55937) by zero.zsh.org with esmtps (TLS1.3:TLS_AES_256_GCM_SHA384:256) id 1mdrn8-000JZA-C1; Fri, 22 Oct 2021 10:28:50 +0000 Received: from postfix01.mail.de (postfix03.bt.mail.de [10.0.121.127]) by shout01.mail.de (Postfix) with ESMTP id 7F353A0B3D; Fri, 22 Oct 2021 12:28:49 +0200 (CEST) Received: from smtp02.mail.de (smtp02.bt.mail.de [10.0.121.212]) by postfix01.mail.de (Postfix) with ESMTP id 65EAA8030D; Fri, 22 Oct 2021 12:28:49 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=mail.de; s=mailde202009; t=1634898529; bh=3zuGksCjby9YEc2gtq9MRBnkBavek9muxWyxI+3pCmU=; h=Subject:To:Cc:References:From:Date:In-Reply-To:From; b=6Ik96i/qVRP5/eE1THK8B2pXaLB4J1RWiInpyVY5c+IOUCX3f5vXMTa+o07TIFBJH VgweSfYZ9ms0xV8Ng3uK4FrkYEvC+THjfT0AeDQI61+rVd8KZwhsgOXWfo3HhTy1zu r1j6qjXVxoOZZRRencRyVm9QBJNLrDKSnwT7Z4zjbn4jDt0bucybeTLCLK5iVFAT4A mGU7qTvVF/Pw4GlPIIDhpIK4u70jhyKuSI35Lu9G+oyW1onbmvJc+/71qMJHo4zqUU YnKMt8lFIVare0HpPf11LP+U7J5hzf29fIuY3RFmpNINiV5SoO+98KvCIt5XvX2uxX tfecn+IoyU+4g== Received: from [127.0.0.1] (localhost [127.0.0.1]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by smtp02.mail.de (Postfix) with ESMTPSA id 26539A6CBE; Fri, 22 Oct 2021 12:28:47 +0200 (CEST) Subject: Re: Unexpected stdin-behavior To: Bart Schaefer Cc: Zsh hackers list References: <2abd99f9-c1c0-1385-f8b4-be9b8f14c4d9@mail.de> <13d30855-d91c-7def-6834-f0ec24cfd598@mail.de> From: Tycho Kirchner Message-ID: Date: Fri, 22 Oct 2021 12:28:46 +0200 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-purgate: clean X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate-type: clean X-purgate-Ad: Categorized by eleven eXpurgate (R) http://www.eleven.de X-purgate: This mail is considered clean (visit http://www.eleven.de for further information) X-purgate: clean X-purgate-size: 1381 X-purgate-ID: 154282::1634898528-0000784B-21764F62/0/0 X-Seq: 49514 Archived-At: X-Loop: zsh-workers@zsh.org Errors-To: zsh-workers-owner@zsh.org Precedence: list Precedence: bulk Sender: zsh-workers-request@zsh.org X-no-archive: yes List-Id: List-Help: List-Subscribe: List-Unsubscribe: List-Post: List-Owner: List-Archive: Am 21.10.21 um 21:14 schrieb Bart Schaefer: > On Thu, Oct 21, 2021 at 9:47 AM Tycho Kirchner wrote: >> >> thanks for your response. Could you please elaborate how your answer >> explains the difference in the output between the commands >> zsh -s and >> zsh -s -i >> ? > > When -i is NOT present, stdin is set to line buffered for the stdio library. > > I don't actually see any difference between -s and -s -i except for > the printing of the prompt, when I try it with the latest development > version, and the only code difference is the removal of stdio. This > is probably an unintentional behavior change in the new code, and may > bear looking into. > > For zsh-workers (particularly PWS), I'm referring to this bit of code in init.c: > > /* > * Finish setting up SHIN and its relatives. > */ > shinbufalloc(); > if (isset(SHINSTDIN) && !SHIN && unset(INTERACTIVE)) { > #ifdef _IONBF > setvbuf(stdin, NULL, _IONBF, 0); > #else > setlinebuf(stdin); > #endif > } > > We either don't need the set*buf business at all, or we need its > equivalent for shinbuf, I think. > Indeed, in the latest dev-version both behave the same. I think *now both behave wrong*, instead zsh -s -i should behave the same as zsh -s did previously, not the other way round.