All of lore.kernel.org
 help / color / mirror / Atom feed
From: "H. Peter Anvin" <hpa@zytor.com>
To: Linus Torvalds <torvalds@osdl.org>
Cc: Matthias Lederhofer <matled@gmx.net>,
	Git Mailing List <git@vger.kernel.org>
Subject: Re: Clean up sha1 file writing
Date: Sun, 04 Jun 2006 12:05:32 -0700	[thread overview]
Message-ID: <44832EFC.4030507@zytor.com> (raw)
In-Reply-To: <Pine.LNX.4.64.0606041139310.5498@g5.osdl.org>

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

  reply	other threads:[~2006-06-04 19:05 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-24 15:30 Clean up sha1 file writing Linus Torvalds
2006-05-24 18:14 ` Matthias Lederhofer
2006-05-24 18:52   ` Linus Torvalds
2006-06-02 18:44     ` H. Peter Anvin
2006-06-02 21:17       ` Linus Torvalds
2006-06-04 18:25         ` H. Peter Anvin
2006-06-04 18:39           ` Linus Torvalds
2006-06-04 18:40             ` Linus Torvalds
2006-06-04 19:05               ` H. Peter Anvin [this message]
2006-05-24 20:46 ` Junio C Hamano
2006-05-24 23:35   ` Linus Torvalds
2006-05-25  0:19     ` Junio C Hamano
2006-05-25  0:31       ` Sean
2006-05-25  0:31         ` Sean
2006-05-25  1:22         ` [PATCH] cat-file: document -p option Jeff King
2006-05-26  5:36       ` Clean up sha1 file writing Junio C Hamano

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=44832EFC.4030507@zytor.com \
    --to=hpa@zytor.com \
    --cc=git@vger.kernel.org \
    --cc=matled@gmx.net \
    --cc=torvalds@osdl.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.