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 c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature