diff --git a/bench/tool/tool.ml b/bench/tool/tool.ml index 74b29f00..9e28aa82 100644 --- a/bench/tool/tool.ml +++ b/bench/tool/tool.ml @@ -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 @@ -53,6 +57,8 @@ let wait_pid = end; Sys.set_signal Sys.sigchld Signal_default; let waited_pid, status = Unix.waitpid [] (-pid) in + (* To prevent 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);