Skip to content

Commit

Permalink
Fix MPR#7235 (ocaml#1870)
Browse files Browse the repository at this point in the history
  • Loading branch information
pierreweis authored and shindere committed Jul 2, 2018
1 parent 396ede4 commit a000769
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ Working version
alternative integer formatting.
(ygrek, review by Gabriel Scherer)

- MPR#7235: Format, flush err_formatter at exit.
(Pierre Weis, request by Jun Furuse)

### Other libraries:

- GPR#1061: Add ?follow parameter to Unix.link. This allows hardlinking
Expand Down
8 changes: 6 additions & 2 deletions stdlib/format.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1367,9 +1367,13 @@ let kasprintf k (Format (fmt, _)) =

let asprintf fmt = kasprintf (fun s -> s) fmt

(* Output everything left in the pretty printer queue at end of execution. *)
let () = at_exit print_flush
(* Flushing standard formatters at end of execution. *)

let flush_standard_formatters () =
pp_print_flush std_formatter ();
pp_print_flush err_formatter ()

let () = at_exit flush_standard_formatters

(*
Expand Down

0 comments on commit a000769

Please sign in to comment.