summaryrefslogtreecommitdiffstats
path: root/stdlib/pervasives.ml
diff options
context:
space:
mode:
authorDamien Doligez <damien.doligez-inria.fr>2002-09-27 14:20:58 +0000
committerDamien Doligez <damien.doligez-inria.fr>2002-09-27 14:20:58 +0000
commit0d5055997a84b343869bfd38ebaae9a43aa69d1d (patch)
tree9b8bdb68a2ac6a074693c824e32e67feaf9782e1 /stdlib/pervasives.ml
parent9c5fffdf51390e4bcd28cdf972990f927374c78e (diff)
PR#1378
git-svn-id: http://caml.inria.fr/svn/ocaml/trunk@5148 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/pervasives.ml')
-rw-r--r--stdlib/pervasives.ml4
1 files changed, 3 insertions, 1 deletions
diff --git a/stdlib/pervasives.ml b/stdlib/pervasives.ml
index c03f63b51..93bed595f 100644
--- a/stdlib/pervasives.ml
+++ b/stdlib/pervasives.ml
@@ -271,7 +271,9 @@ external seek_out : out_channel -> int -> unit = "caml_seek_out"
external pos_out : out_channel -> int = "caml_pos_out"
external out_channel_length : out_channel -> int = "caml_channel_size"
external close_out_channel : out_channel -> unit = "caml_close_channel"
-let close_out oc = flush oc; close_out_channel oc
+let close_out oc =
+ begin try flush oc with _ -> () end;
+ close_out_channel oc
external set_binary_mode_out : out_channel -> bool -> unit
= "caml_set_binary_mode"