Re: stdin should be consumed line by line

Max Nikulin <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On 22/10/2021 18:11, Tycho Kirchner wrote:
> I think stdin should be consumed line by line in order to make passing 
> to other commands possible. Please consider the following difference 
> between the stdin "consumption" between bash and dash
> 
> $ stdintest(){ printf 'echo one\ndash -c "while read -r row; do echo got 
> row \$row; done" \necho two\n'; }
> $ stdintest | dash
> one
> two
> $ stdintest | bash
> one
> got row echo two
> $
> 
> I think bash behaves "correct" here.

When I noticed the issue, I found this message with no response, but not 
other threads. I believe, the following links may be useful for those 
who will get this report in search engine results. It is a bug in dash 
and latest released version does not contains its fix.

<https://lore.kernel.org/dash/[email protected]/t/>
[PATCH] input: preadfd: read standard input byte-wise
Tue, 13 Dec 2022 23:17:32 +0100

<https://lore.kernel.org/dash/[email protected]/t/#u>
[v3 PATCH 0/3] Improve performance when reading stdin.
Sun, 02 Jun 2024 09:31:30 +0800

<https://bugs.debian.org/862907>
dash: Incorrectly slurps script from stdin (POSIX compliance issue)
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.