Skip to content

Commit

Permalink
Make sure to kill leaky klee processes
Browse files Browse the repository at this point in the history
  • Loading branch information
filipeom committed Aug 30, 2024
1 parent 0fb3e69 commit ff98974
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bench/tool/tool.ml
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,10 @@ let mk_symbiotic () = Symbiotic

exception Sigchld

let kill_klee_descendants () =
let _ = Format.ksprintf Sys.command "pkill klee" in
()

let wait_pid =
let last_utime = ref 0. in
let last_stime = ref 0. in
Expand All @@ -53,6 +57,8 @@ let wait_pid =
end;
Sys.set_signal Sys.sigchld Signal_default;
let waited_pid, status = Unix.waitpid [] (-pid) in
(* Because symbiotic is leaking klee processes *)
kill_klee_descendants ();
let end_time = Unix.gettimeofday () in
let { Rusage.utime; stime; _ } = Rusage.get Rusage.Children in
assert (waited_pid = pid);
Expand Down

0 comments on commit ff98974

Please sign in to comment.