From ff989748fa35022b2588ee0f9528a3bb78540a9b Mon Sep 17 00:00:00 2001 From: Filipe Marques Date: Thu, 29 Aug 2024 23:03:35 +0200 Subject: [PATCH] Make sure to kill leaky klee processes --- bench/tool/tool.ml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/bench/tool/tool.ml b/bench/tool/tool.ml index 74b29f00..3b889151 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 + (* 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);