summaryrefslogtreecommitdiffstats
path: root/ocaml/examples
diff options
context:
space:
mode:
Diffstat (limited to 'ocaml/examples')
-rw-r--r--ocaml/examples/create_disk.ml6
1 files changed, 6 insertions, 0 deletions
diff --git a/ocaml/examples/create_disk.ml b/ocaml/examples/create_disk.ml
index 75dbdc35..4437b1c8 100644
--- a/ocaml/examples/create_disk.ml
+++ b/ocaml/examples/create_disk.ml
@@ -57,6 +57,12 @@ let () =
*)
g#upload "/etc/resolv.conf" "/foo/resolv.conf";
+ (* Because we wrote to the disk and we want to detect write
+ * errors, call g#shutdown. You don't need to do this:
+ * g#close will do it implicitly.
+ *)
+ g#shutdown ();
+
(* Note also that handles are automatically closed if they are
* reaped by the garbage collector. You only need to call close
* if you want to close the handle right away.