Issue 10344 Exiting _Dmain should flush all FILE*s and return nonzero on failure