Re: [herbertx/dash] regression in reading variables from pipe for external processes (Issue #8)

Herbert Xu <[email protected]>
Newsgroups org.kernel.vger.dash
Message-ID <[email protected]>
On Tue, Jul 23, 2024 at 12:04:38PM +0000, arĉi wrote:
> this script
> ```shell
> printf '1\n2\n' | while read i; do
> 	/bin/echo "$i"
> done
> ```
> outputs
> ```
> 1
> ```
> while this script
> ```shell
> printf '1\n2\n' | while read i; do
> 	echo "$i"
> done
> ```
> outputs
> ```
> 1
> 2
> ```
> (as expected)
> both scripts emit second output on release.
> git-bisect revealed this was introduced in 44b15ea09a9ee5872cf477e4ffc6b42ef37d1e46

Thanks for the report.

This means that fallback code-path when tee(2) isn't available
isn't working.  Perhaps the seek testing isn't working as expected.

Unfortunately I couldn't reproduce this on Linux.  Please tell us
what OS you're using and provide a strace of the failing execution.

There was another similar report about this:

https://lore.kernel.org/dash/[email protected]/T/#t

Cheers,
-- 
Email: Herbert Xu <[email protected]>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt
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.