bug-tar
[Top][All Lists]
Advanced

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

Re: Tar doesn't handle short reads


From: Paul Eggert
Subject: Re: Tar doesn't handle short reads
Date: Thu, 30 Jul 2020 12:13:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0

On 7/29/20 1:31 AM, Dominique Martinet wrote:

But we do stat before, and have that race condition already, because of
the 0-blocks sparse file optimization at least ?

I didn't know that, but if that's the case that's a race that should also be 
fixed.

even if the file is regular, it can legitimately be interrupted by a
signal.

Sure, but if the program has no signal handler that returns, then the program should never get a short read on a regular file. At least, that's the longstanding tradition and I expect that's why POSIX says 'read' should do that.

Well; I don't know. I'm open to discussion on how to improve 9p as well
in parallel, but I think the safe approach would be to work on both.

Yes, probably 'tar' should be modified to deal with this glitch, if someone gets the time to do that.



reply via email to

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