From: Christian Couder Date: Tue, 07 Aug 2018 16:28:58 GMT Subject: Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C Message-ID: In-Reply-To: <6832700d-d7be-1df1-8b24-6e0290de63ed@talktalk.net> On Tue, Aug 7, 2018 at 6:15 PM, Phillip Wood wrote: > On 07/08/18 16:25, Christian Couder wrote: >> >> I agree about checking the return value from fputs(), but it seems to >> me that we don't usually check the value of fclose(). > > A quick grep shows you're right, there are only a handful of places where > the return value of fclose() is checked (there aren't many checks for the > return value of close() either), I'm don't think that is safe though given > that write errors may only show up when the file gets flushed by closing it. I vaguely remember we tried to check those return values but it didn't work well sometimes.