From 826f891df87b11d443c08c906784749c92e8b18e Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Mon, 31 Oct 2016 22:51:37 -0700 Subject: Flush *stdout* upon unhandled exception. * unwind.c (uw_unwind_to_exit_point): Prior to printing diagnostics related to an unhandled exception to std_error, flush std_output. This clarifies the output in situations when both std_error and std_output go to the same destination, and the exception occurred while producing output on std_output. --- unwind.c | 1 + 1 file changed, 1 insertion(+) diff --git a/unwind.c b/unwind.c index 6fc2720e..9377fdd3 100644 --- a/unwind.c +++ b/unwind.c @@ -112,6 +112,7 @@ static void uw_unwind_to_exit_point(void) if (opt_loglevel >= 1) { val prefix = format(nil, lit("~a:"), prog_string, nao); + flush_stream(std_output); format(std_error, lit("~a unhandled exception of type ~a:\n"), prefix, sym, nao); -- cgit v1.2.3