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:
parent
5bc0bf58df
commit
55d51c3666
1
ocaml/.gitignore
vendored
1
ocaml/.gitignore
vendored
@ -9,4 +9,5 @@ Qptypes.ml
|
|||||||
generated.ninja
|
generated.ninja
|
||||||
qmcchem
|
qmcchem
|
||||||
qptypes_generator
|
qptypes_generator
|
||||||
|
Property.ml
|
||||||
|
|
||||||
|
@ -79,7 +79,18 @@ let run ezfio_filename dataserver =
|
|||||||
| Ok _ -> ()
|
| Ok _ -> ()
|
||||||
| _ -> print_endline "Unable to remove temporary directory"
|
| _ -> 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
|
in
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,8 +7,8 @@ let _threads = ref [] ;;
|
|||||||
(** Kill the current process and all children *)
|
(** Kill the current process and all children *)
|
||||||
let kill () =
|
let kill () =
|
||||||
let kill pid =
|
let kill pid =
|
||||||
Printf.printf "Killed %d\n" (Pid.to_int pid);
|
Signal.send_i Signal.int (`Pid pid);
|
||||||
Signal.send_i Signal.term (`Pid pid)
|
Printf.printf "Killed %d\n" (Pid.to_int pid)
|
||||||
in
|
in
|
||||||
List.iter ~f:kill (!_list);
|
List.iter ~f:kill (!_list);
|
||||||
exit 1
|
exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user