On Fr, 2014-06-13 at 09:47 +0200, Paolo Bonzini wrote:
Il 13/06/2014 09:15, Markus Armbruster ha scritto:
I'm afraid this is not an improvement.
Your patch makes the code ignore fclose() failure silently. This is a
common mistake. fclose() failure after write can mean data loss, and
the user certainly needs to know about that.
If you want that, the best solution is to first fflush() and then
fclose().
Agree. If you really care you'll go flush/sync before close, so you
still have a valid file handle when you see the failure.
Question is do we really need that here? This isn't your virtual disk,
it's just a few audio samples which might get lost ...