http://d.puremagic.com/issues/show_bug.cgi?id=10344
Lionello Lunesu <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |[email protected] --- Comment #17 from Lionello Lunesu <[email protected]> 2013-06-17 23:32:08 PDT --- Adding if (fflush(null) != 0) throw new Error("write error"); in druntime/src/rt/dmain2.d line 621, between rt_moduleDtor() and gc_term(), seems to work: $ ./helloworld 1</dev/null object.Error: write error ---------------- 5 hw 0x0000000108047755 extern (C) int rt.dmain2._d_run_main(int, char**, extern (C) int function(char[][])*).void tryExec(scope void delegate()) + 45 6 hw 0x0000000108047709 _d_run_main + 457 7 hw 0x0000000108047538 main + 20 8 libdyld.dylib 0x00007fff8e6107e1 start + 0 9 ??? 0x0000000000000001 0x0 + 1 ---------------- But the question is: what to throw? Unfortunately ErrnoException is in phobos, not in druntime. We could move it to druntime (adding an alias for backcompat.) Moving it would not introduce any additional dependencies to druntime. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
