bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: AW: Re: read command sometimes misses newline on timeout


From: Chet Ramey
Subject: Re: AW: Re: read command sometimes misses newline on timeout
Date: Sat, 12 Oct 2024 15:29:31 -0400
User-agent: Mozilla Thunderbird

On 10/7/24 9:49 AM, Thomas Oettli wrote:
I agree with you, but it should never happen that read returns timeout, also returns the full line and has already read the newline character.

I don't see how that can happen, given how the code is structured. It's
possible for the shell to read all the data on the line and time out before
reading the newline, returning the text of the line. The next read
reads only a newline, and returns the empty string. But I can't see
how that can reproduce your results.

Please also see the answer from Martin D Kealey, I think he is on to something:
https://lists.gnu.org/archive/html/bug-bash/2024-10/msg00007.html <https:// lists.gnu.org/archive/html/bug-bash/2024-10/msg00007.html>

Thanks, I'll look.

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

Attachment: OpenPGP_signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]