On 10/9/24 2:01 PM, Oğuz wrote:
The first letter I type after running this command won't show up on
the terminal:

     : < <(cat)

This is reproducible on 5.3 beta too.

It's cat and the scheduler. You have two processes fighting over stdin.
cat inherits stdin, and successfully reads one character, because its
read returns successfully before readline's pselect returns indicating
that there is input and readline calls read.

cat tries to write the character to an invalid fd (the pipe is gone), gets
-1/EPIPE/SIGPIPE, and dies in the background.

Readline calls read and successfully reads the next character.

--
``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, UTech, CWRU    c...@case.edu    http://tiswww.cwru.edu/~chet/

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature

Reply via email to