As of this commit:
commit a065467315dc5f2f312f7e6f1d2e9d05a77b3cb7
Author: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
Date: Sun Jun 2 09:31:32 2024 +0800
input: Move newline loop into preadbuffer
As it stands preadfd tries to fetch a whole line when we're reading
one byte at a time. However, this is wrong because how many bytes
we're trying to read has nothing to do with whether we get a whole
line or not.
Move the loop into preadbuffer alongside the other history support
code.
Signed-off-by: Herbert Xu <herbert@xxxxxxxxxxxxxxxxxxx>
...reading from a FIFO is broken, at least on macOS 12.7.5. It seems like the
'read' command can no longer read anything from a FIFO.
Reproducer:
$ dash -c 'trap "rm fifo" 0; mkfifo fifo;
echo OK >fifo & read r <fifo; echo "${#r}:$r"'
0:
Expected output:
2:OK
--
|| modernish -- harness the shell
|| https://github.com/modernish/modernish
||
|| KornShell lives!
|| https://github.com/ksh93/ksh