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.
