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

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jun 14 14:47:43 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=10344


Peter Alexander <peter.alexander.au at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |peter.alexander.au at gmail.co
                   |                            |m


--- Comment #5 from Peter Alexander <peter.alexander.au at gmail.com> 2013-06-14 14:47:41 PDT ---
(In reply to comment #4)
> Will writeln()/flush() hijack main return code even though the programmer
> EXPLICITLY returned something else?

At the end of the original post, Andrei wrote:

"We should add the call to fflush to main() and return nonzero IF AND ONLY IF:
(a) fflush(null) fails, and (b) the program would have otherwise returned 0."

So, it will only hijack the return code if the return code was 0.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list