Skip to content

Commit

Permalink
Stop process on cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
patricoferris committed Sep 30, 2022
1 parent 91c7c4a commit 0127acc
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib_eio_linux/eio_linux.ml
Original file line number Diff line number Diff line change
Expand Up @@ -1206,9 +1206,11 @@ let process = object
let process = pid_to_process close pid in
let cleanup () =
try
ignore (wait_for_process [] pid);
process#stop;
close ()
with Unix.Unix_error (ECHILD, _, _) -> ()
with Unix.Unix_error (Unix.ESRCH, _, _) ->
(* Process is already finished when trying to stop it. *)
()
in
Switch.on_release sw cleanup;
process
Expand Down

0 comments on commit 0127acc

Please sign in to comment.