diff --git a/ocaml/.gitignore b/ocaml/.gitignore index d6883ef..14cbb4d 100644 --- a/ocaml/.gitignore +++ b/ocaml/.gitignore @@ -9,4 +9,5 @@ Qptypes.ml generated.ninja qmcchem qptypes_generator +Property.ml diff --git a/ocaml/Qmcchem_forwarder.ml b/ocaml/Qmcchem_forwarder.ml index e886093..ba8874c 100644 --- a/ocaml/Qmcchem_forwarder.ml +++ b/ocaml/Qmcchem_forwarder.ml @@ -79,7 +79,18 @@ let run ezfio_filename dataserver = | Ok _ -> () | _ -> print_endline "Unable to remove temporary directory" ; - ZMQ.Context.terminate zmq_context + ZMQ.Context.terminate zmq_context ; + for i=port to port+4 + do + let filename = + Filename.concat Qmcchem_config.dev_shm (Printf.sprintf ":%d" i) + in + try + Unix.unlink filename + with + | _ -> () + ; + done in diff --git a/ocaml/Watchdog.ml b/ocaml/Watchdog.ml index fbdfbab..a9d2e3d 100644 --- a/ocaml/Watchdog.ml +++ b/ocaml/Watchdog.ml @@ -7,8 +7,8 @@ let _threads = ref [] ;; (** Kill the current process and all children *) let kill () = let kill pid = - Printf.printf "Killed %d\n" (Pid.to_int pid); - Signal.send_i Signal.term (`Pid pid) + Signal.send_i Signal.int (`Pid pid); + Printf.printf "Killed %d\n" (Pid.to_int pid) in List.iter ~f:kill (!_list); exit 1