10
1
mirror of https://gitlab.com/scemama/qmcchem.git synced 2024-12-22 04:13:31 +01:00

Remove pipe files after forwarder terminates

This commit is contained in:
Anthony Scemama 2015-12-29 03:31:08 +01:00
parent 5bc0bf58df
commit 55d51c3666
3 changed files with 15 additions and 3 deletions

1
ocaml/.gitignore vendored
View File

@ -9,4 +9,5 @@ Qptypes.ml
generated.ninja
qmcchem
qptypes_generator
Property.ml

View File

@ -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

View File

@ -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