git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Linus Torvalds <torvalds@linux-foundation.org>
To: Jim Meyering <jim@meyering.net>
Cc: git@vger.kernel.org
Subject: Re: [PATCH] Don't ignore write failure from git-diff, git-log, etc.
Date: Mon, 28 May 2007 09:32:06 -0700 (PDT)	[thread overview]
Message-ID: <alpine.LFD.0.98.0705280929140.26602@woody.linux-foundation.org> (raw)
In-Reply-To: <87sl9hw0o0.fsf@rho.meyering.net>



On Mon, 28 May 2007, Jim Meyering wrote:
> 
> I suspect that git's special treatment of EPIPE was a shoot-the-messenger
> reaction to the work-around (trap '' PIPE) required to avoid diagnostics
> from porcelain being interpreted by what would now be a 2-year-old
> version of bash.

No. You don't seem to realize. That was the *default* behaviour of bash.

For all I know, it might _still_ be the default behaviour.

The only reason not everybody ever even noticed, was that most 
distributions were clueful enough to have figured out that it was broken, 
and configured bash separately. But "most" does not mean "all", and I had 
this problem on powerpc, and others had it on Debian, I htink  (might have 
been slackware). I think RH and SuSE had both fixed it explicitly.

> diff --git a/write_or_die.c b/write_or_die.c
> index 5c4bc85..fadfcaa 100644
> --- a/write_or_die.c
> +++ b/write_or_die.c
> @@ -41,8 +41,6 @@ int write_in_full(int fd, const void *buf, size_t count)
>  void write_or_die(int fd, const void *buf, size_t count)
>  {
>  	if (write_in_full(fd, buf, count) < 0) {
> -		if (errno == EPIPE)
> -			exit(0);
>  		die("write error (%s)", strerror(errno));

Nack. Nack. NACK.

I think this patch is fundamentally WRONG. This fragment is just a prime 
example of why the whole patch is crap. The old code was correct, and you 
broke it.

		Linus

  parent reply	other threads:[~2007-05-28 16:33 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-05-26 11:45 [PATCH] Don't ignore write failure from git-diff, git-log, etc Jim Meyering
2007-05-26 16:18 ` Linus Torvalds
2007-05-26 17:27   ` Junio C Hamano
2007-05-27  3:03     ` Nicolas Pitre
2007-05-27  9:16   ` Jim Meyering
2007-05-27 16:17     ` Linus Torvalds
2007-05-28 13:14       ` Jim Meyering
2007-05-28 15:46         ` Marco Roeland
2007-05-28 18:19           ` Jim Meyering
2007-05-28 19:05             ` Marco Roeland
2007-05-28 20:23               ` Jim Meyering
2007-05-28 23:41                 ` Petr Baudis
2007-05-28 20:44             ` Junio C Hamano
2007-05-29 20:11               ` Jim Meyering
2007-05-29 23:50                 ` Junio C Hamano
2007-05-30  7:12                   ` Jim Meyering
2007-05-28 16:32         ` Linus Torvalds [this message]
2007-05-28 20:04           ` Jim Meyering
2007-05-29  3:01             ` Linus Torvalds
2007-05-29 20:19               ` Jim Meyering
2007-05-29 21:19                 ` Linus Torvalds
2007-05-30 12:25                   ` Jim Meyering
2007-05-30 15:40                     ` Linus Torvalds
2007-05-30 16:12                       ` Jim Meyering
2007-05-28 21:27         ` Junio C Hamano
2007-05-29  3:47           ` Linus Torvalds
2007-05-30 11:39           ` Jim Meyering
2007-05-30 17:51             ` Junio C Hamano
2007-05-30 19:43               ` Jim Meyering

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=alpine.LFD.0.98.0705280929140.26602@woody.linux-foundation.org \
    --to=torvalds@linux-foundation.org \
    --cc=git@vger.kernel.org \
    --cc=jim@meyering.net \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).