Re: [GSoC][PATCH v5 02/20] rebase -i: rewrite append_todo_help() in C
- From
Christian Couder <christian.couder@gmail.com>
- Date
- Aug 7, 2018, 16:28 UTC
- Message-ID
- <CAP8UFD2_oxn=auXb1tYCb5xED5YmKU3W=fCrpMsyxdZBfs2qcw@mail.gmail.com>
- In-Reply-To
- <6832700d-d7be-1df1-8b24-6e0290de63ed@talktalk.net>
On Tue, Aug 7, 2018 at 6:15 PM, Phillip Wood <phillip.wood@talktalk.net> wrote:
Show 9 quoted lines
> 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.