Displaying 2 results from an estimated 2 matches for "32944ed27".
2017 Nov 05
0
[PATCH 2/2] common/mlstdutils: Add with_openfile function.
...4 ++++
common/mlstdutils/std_utils.mli | 6 ++++++
daemon/devsparts.ml | 5 ++---
daemon/inspect_fs_windows.ml | 18 ++++++++----------
4 files changed, 20 insertions(+), 13 deletions(-)
diff --git a/common/mlstdutils/std_utils.ml b/common/mlstdutils/std_utils.ml
index ee6bea5af..32944ed27 100644
--- a/common/mlstdutils/std_utils.ml
+++ b/common/mlstdutils/std_utils.ml
@@ -662,6 +662,10 @@ let with_open_out filename f =
let chan = open_out filename in
protect ~f:(fun () -> f chan) ~finally:(fun () -> close_out chan)
+let with_openfile filename flags perms =
+ let fd =...
2017 Nov 05
3
[PATCH 1/2] common/mlstdutils: Add with_open_in and with_open_out functions.
These safe wrappers around Pervasives.open_in and Pervasives.open_out
ensure that exceptions escaping cannot leave unclosed files.
---
common/mlstdutils/std_utils.ml | 39 ++++++++++++++++++++--------------
common/mlstdutils/std_utils.mli | 12 +++++++++++
common/mltools/tools_utils.ml | 39 +++++++++++++++++-----------------
dib/dib.ml | 9 ++++----