From 453a29d60724f77b1b679deb6f469caa2853bd9c Mon Sep 17 00:00:00 2001 From: Anthony Scemama Date: Thu, 3 Mar 2016 13:39:06 +0100 Subject: [PATCH] Try except to clean tmpdir --- ocaml/Qmcchem_forwarder.ml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/ocaml/Qmcchem_forwarder.ml b/ocaml/Qmcchem_forwarder.ml index deaf50a..4a421f3 100644 --- a/ocaml/Qmcchem_forwarder.ml +++ b/ocaml/Qmcchem_forwarder.ml @@ -465,6 +465,13 @@ let run ezfio_filename dataserver = end; (* Wait for the qmc process to complete *) - ignore (Watchdog.join ()); - terminate () + try + ignore (Watchdog.join ()); + terminate () + with + | error -> + begin + terminate (); + raise error + end