Re: read reads from stale buffer after interrupt

2024-05-31 Thread Chet Ramey
On 5/31/24 11:57 AM, Oğuz wrote: On Friday, May 31, 2024, Chet Ramey > wrote: Thanks for the report. Since this occurs when read(2) returns a partial buffer on an interrupt, I think we can handle it in read_builtin(). Okay, handle how though? Leave the file

Re: read reads from stale buffer after interrupt

2024-05-31 Thread Oğuz
On Friday, May 31, 2024, Chet Ramey wrote: > > Thanks for the report. Since this occurs when read(2) returns a partial > buffer on an interrupt, I think we can handle it in read_builtin(). > Okay, handle how though? Leave the file offset at the last byte read before the interrupt or where the las

Re: read reads from stale buffer after interrupt

2024-05-31 Thread Chet Ramey
On 5/28/24 1:53 AM, Oğuz wrote: See: $ while read; do :; done Thanks for the report. Since this occurs when read(2) returns a partial buffer on an interrupt, I think we can handle it in read_builtin(). -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa

read reads from stale buffer after interrupt

2024-05-27 Thread Oğuz
See: $ while read; do :; done