[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Tar doesn't handle short reads
From: |
Nikos Tsipinakis |
Subject: |
Re: Tar doesn't handle short reads |
Date: |
Sat, 26 Sep 2020 16:59:05 +0300 |
[ As said requested in the original message, please keep me in Cc ]
On 05/08/2020, Paul Eggert wrote:
> On 8/5/20 11:47 AM, Nikos Tsipinakis wrote:
> > Can you elaborate? I can't find a code path that loses the errno.
>
> full_read reads a partial block and then tries to read again. The second
> read fails with errno == EIO. full_read then returns the number of bytes
> successfully read, and the caller ignores errno.
Apologies for the delay, but now I have the time and energy to get this through
the finish line. The easiest way to do fix this is probably to make
`blocking_read` check errno and return an error if bytes < count (see attached
patch)
0001-Use-full_read-to-avoid-errors-due-to-short-reads.patch
Description: Text Data
- Re: Tar doesn't handle short reads,
Nikos Tsipinakis <=