From: Linus Torvalds Date: Mon, 25 Jun 2007 23:01:58 GMT Subject: Re: [PATCH] git-rev-list: give better diagnostic for failed write Message-ID: In-Reply-To: On Mon, 25 Jun 2007, Linus Torvalds wrote: > > Actually, even this is really nasty, and it's a case where the current > "git.c" code can also fail. Just to clarify: this is why the git.c code obviously does the fstat(), in case anybody wondered. So I didn't mean to imply that the new git.c code in 'next' is wrong, I just meant to imply that the "ferror()"+"fflush()" sequence that it uses and that I copied for my example is a very unreliable sequence, and it basically fails exactly because you can never know what caused the ferror() to trigger - if it *ever* triggers, you're basically screwed. I wonder how many applications actually ever use ferror() and friends. Linus