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,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED,UNPARSEABLE_RELAY
autolearn=ham autolearn_force=no version=3.4.4
Received: (qmail 4974 invoked from network); 22 Oct 2021 10:59:38 -0000
Received: from zero.zsh.org (2a02:898:31:0:48:4558:7a:7368)
by inbox.vuxu.org with ESMTPUTF8; 22 Oct 2021 10:59:38 -0000
ARC-Seal: i=1; cv=none; a=rsa-sha256; d=zsh.org; s=rsa-20210803; t=1634900378;
b=jN5B4I6ljZIljb8ubN+POY4XCPu4yLpyLG0Dt8rPlu8eCksQw2jPGb4/o9PK6TKFSFemlBOpcU
LT1hchXZEpQ3GsnXesQuZB28V4+5F1JYYcnXyQheE8HRI13Dy5j744/2wKQQcvrUlvvhYPzU5K
V7l2KZu6ot3QCmrpMVCr1aD/xeqGAZJQ447fIolPLtgKPDRJLEKCECEKwAZuu57fv7VzR9jP7V
cQvYzaX5OjjUYRcs4igcVKbTvSOjgQZD7YkjLdQT6BdEOgKLMhxlHwnOnnrNvriHUmWlZTaz+j
BaFu2mBCzFBqr4Dg3rUkqMu5fUoy+3yc042UqVQnYvt3fQ==;
ARC-Authentication-Results: i=1; zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed; d=zsh.org; s=rsa-20210803; t=1634900378;
bh=VRTw8IDORUH1PSAiprb53XPZVyJZWby+ApK3l+PZg+s=;
h=List-Archive:List-Owner:List-Post:List-Unsubscribe:List-Subscribe:List-Help:
List-Id:Sender:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:
References:In-Reply-To:Message-ID:Cc:To:From:Date:DKIM-Signature:
DKIM-Signature;
b=cUDhq74lDTM6E0dRO5t5HkfQuf5f8alqlbTLSjedsPUQXo4u94rTqm7eACi7/ddoqY5H+Qa1sF
MTEl6U5Kts+TbBOmJzNKzt6bPpkMnSGyt/ImsoNqOvvfidI4xb1++3NJjsV/KOG2bZj4y4pJg3
/crkUiX1+AsS8UzhL5jEpxJ7TOpuP7avDIsqsyk6vGLkBQ7FkK3fq1z0OoBtGrbvfSYWGnO9iX
Z+nY/6s3oZSFud6u07E3qEKpxRx/V8x3dyTv8C1Jybiy4g2LmfU0W1lLUeyjTxZywPxHOXWMHr
Q8cYsg8eDYLoY0y1SrBcgFyZft2mUUXpfNJxZLB2jYBUww==;
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:MIME-Version:Subject:References:In-Reply-To:Message-ID:Cc:To:
From:Date:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:
Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID;
bh=TKeroeUxc4nhyJ598+kH7P9xKr2IB3WRsXKP1Q6d5PI=; b=qLNb4qH7SN2tjU/ZwgvUYCWLh1
yz1OQ3/gD3hRYkYvw6eQyDxmFxd+cxZs+utmnxqh+VarsZbPzosgBUE9Bd0KvbqDmGsboVxEvSBqO
LJA1Su0RiakwMZWOcZnU1uL3xeYU0/aP8TMk8ESvCmlW9X9SBbzHM2rUMZU8wGST2xVk/YXo/XbOa
mbhCTb5b2GxzMZ4KRhE8fqg+TMQ0Kkk3l4mNZUbcPBij7n7oWxCkNB7SgK0t03Bv4yl+vO6PI1OkC
WihRk6Zs/H56w5J/a4gRHs/jY6m+X/P8qzqEFyEggEHYUEI1b2LKcqHQzaNUzltls4UwZ85V7IOyc
lLNPpOQQ==;
Received: from authenticated user by zero.zsh.org with local
id 1mdsGv-000LYZ-5S; Fri, 22 Oct 2021 10:59:37 +0000
Authentication-Results: zsh.org;
iprev=pass (smtpq1.tb.ukmail.iss.as9143.net) smtp.remote-ip=212.54.57.96;
dkim=pass header.d=ntlworld.com header.s=meg.feb2017 header.a=rsa-sha256;
dmarc=pass header.from=ntlworld.com;
arc=none
Received: from smtpq1.tb.ukmail.iss.as9143.net ([212.54.57.96]:36144)
by zero.zsh.org with esmtps (TLS1.2:ECDHE-RSA-AES256-GCM-SHA384:256)
id 1mdsFo-000LG7-F0; Fri, 22 Oct 2021 10:58:29 +0000
Received: from [212.54.57.80] (helo=smtp1.tb.ukmail.iss.as9143.net)
by smtpq1.tb.ukmail.iss.as9143.net with esmtp (Exim 4.90_1)
(envelope-from
)
id 1mdsFo-00043Y-2W
for zsh-workers@zsh.org; Fri, 22 Oct 2021 12:58:28 +0200
Received: from oxbe8.tb.ukmail.iss.as9143.net ([172.25.160.139])
by smtp1.tb.ukmail.iss.as9143.net with ESMTP
id dsFnmS5XPC3ocdsFom4miI; Fri, 22 Oct 2021 12:58:28 +0200
X-Env-Mailfrom: p.w.stephenson@ntlworld.com
X-Env-Rcptto: zsh-workers@zsh.org
X-SourceIP: 172.25.160.139
X-CNFS-Analysis: v=2.4 cv=EdPb/dqC c=1 sm=1 tr=0 ts=61729954 cx=a_exe
a=pgSR3NrKiwmx/6vnWRL19w==:117 a=JHxdR_ueUdoA:10 a=IkcTkHD0fZMA:10
a=pfAyaZmUD_0A:10 a=q2GGsy2AAAAA:8 a=ZBYxYKRzkOL78JuIap8A:9 a=QEXdDO2ut3YA:10
a=z9dJwno5l634igLiVhy-:22
X-Authenticated-Sender: p.w.stephenson@ntlworld.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ntlworld.com;
s=meg.feb2017; t=1634900308;
bh=VRTw8IDORUH1PSAiprb53XPZVyJZWby+ApK3l+PZg+s=;
h=Date:From:To:Cc:In-Reply-To:References:Subject;
b=GidkYBITEKPPGU0xDO3w2UDa+GWydVZ62JY5oxVE99pQiobz+rdyn3M+LNhy2AQG8
pUmhoxGLf5Pf1ZAcTbLLHO2EsjwJ+t0VUZljtEFTivx9q8PYDQbUAFV4VVJgWOyFy2
IwnyCIONY1CQUh2lX8I8carXiHzJ4IQi15Kk90As4PSyi4/3uy/hRSidfNwq+hJazf
YDfNlEwiEXsEFm2hrGzP0f8BykNcdtZGZtunTn4h5RwQ+GE+EGyAgP2W2smxpd72Wk
N82P4cRgWVw18E6BasVchCamuXlD9OcxheRqkHp/Kbo7Vf4JI0b3/nZ29VkDIpyj+I
hyJnqpYmPFTPA==
Date: Fri, 22 Oct 2021 11:58:27 +0100 (BST)
From: Peter Stephenson
To: Bart Schaefer ,
Tycho Kirchner
Cc: Zsh hackers list
Message-ID: <705014459.753397.1634900307786@mail2.virginmedia.com>
In-Reply-To:
References: <2abd99f9-c1c0-1385-f8b4-be9b8f14c4d9@mail.de>
<13d30855-d91c-7def-6834-f0ec24cfd598@mail.de>
Subject: Re: Unexpected stdin-behavior
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 7bit
X-Priority: 3
Importance: Medium
X-Mailer: Open-Xchange Mailer v7.8.4-Rev72
X-Originating-IP: 165.225.81.18
X-Originating-Client: open-xchange-appsuite
X-CMAE-Envelope: MS4xfENiKAIm3CCaueKYySkCTfaswxeP/9TrLt86IF+iWGfPhUjcxV1I1JxIcMZrnkRDNLmMHVNVtpQN/xAjrOJAPpQxr+C0YfycOdtoCc0BeLC7bTQqPVFU
5Jd633dKf9LDuyAdVwNgI+2UI4zfG4PLVOvjOvHuhRcZwbANoXvqz4ve2UkdSUgEIZt43nPMEGIFzTuTKSrgdpicRNPfzN5acsSbrFegN831cLz1D9DJuepb
/ELGCuI8pS3ehEYrBfgj9UtdhQfl/UWVVWexqSDqyFV+2hUwnX7Z2Yg98tpGGT++
X-Seq: 49515
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:
> On 21 October 2021 at 20:14 Bart Schaefer wrote:
> 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.
That _IONBF is (and has always been) inconsistent with setlinebuf(), surely?
It means no buffering.
As far as shinbuf itself is concerned, is the most logical behaviour
line buffering (i.e. read ahead only up to a \n) if interactive?
pws