mirror of
https://gitlab.com/scemama/qmcchem.git
synced 2024-12-21 20:03:31 +01:00
Remove pipe files after forwarder terminates
This commit is contained in:
parent
5bc0bf58df
commit
55d51c3666
1
ocaml/.gitignore
vendored
1
ocaml/.gitignore
vendored
@ -9,4 +9,5 @@ Qptypes.ml
|
||||
generated.ninja
|
||||
qmcchem
|
||||
qptypes_generator
|
||||
Property.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
|
||||
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user