Re: Clean up sha1 file writing

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

 



Linus Torvalds wrote:

On Sun, 4 Jun 2006, Linus Torvalds wrote:
On Sun, 4 Jun 2006, H. Peter Anvin wrote:
Or if you're getting a SIGWINCH in the middle of it.

Any POSIX system will interrupt the transfer and return a short read on
receiving a signal.
Only for interruptible fd's, though, which normally a real "file" won't be.

And _usually_ only if you actually have a SIGWINCH handler.

Although older Linux kernels were broken in this regard. They'd interrupt a socket/pipe read or write even for a signal that ended up being ignored.

So it's absolutely the case that having the loop is always the safer thing to do, and it's never the _wrong_ thing to do.


Right. I tend to think of it as implementation-defined the cases where it happen to be safe, with the one exception of transactions which are smaller than PIPE_BUF that are directed to a pipe.

	-hpa
-
: send the line "unsubscribe git" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]