[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: read reads from stale buffer after interrupt
From: |
Chet Ramey |
Subject: |
Re: read reads from stale buffer after interrupt |
Date: |
Fri, 31 May 2024 12:02:04 -0400 |
User-agent: |
Mozilla Thunderbird |
On 5/31/24 11:57 AM, Oğuz wrote:
On Friday, May 31, 2024, Chet Ramey <chet.ramey@case.edu
<mailto:chet.ramey@case.edu>> 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 last successful read command left it?
Reinitialize the buffer state before we longjmp. Since we were interrupted,
we're going to abandon this invocation of read, discarding what we read.
--
``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/
OpenPGP_signature.asc
Description: OpenPGP digital signature