From 50a09f587537eac259595c695f09bf071fdc7f31 Mon Sep 17 00:00:00 2001 From: Tudor Brindus Date: Sat, 17 Feb 2024 18:18:52 -0500 Subject: [PATCH] Restore default SIGINT behavior after taking snapshot This feels like a hack, but it works for now pending discussion with async devs. Signed-off-by: Tudor Brindus --- src/trace.ml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/trace.ml b/src/trace.ml index 4411041ff..63860f553 100644 --- a/src/trace.ml +++ b/src/trace.ml @@ -496,7 +496,8 @@ module Make_commands (Backend : Backend_intf.S) = struct let stop = Ivar.read done_ivar in Async_unix.Signal.handle ~stop [ Signal.int ] ~f:(fun (_ : Signal.t) -> Core.eprintf "[ Got signal, detaching... ]\n%!"; - Ivar.fill_if_empty done_ivar ()); + Ivar.fill_if_empty done_ivar (); + Core.Signal.Expert.set Signal.int `Default); Core.eprintf "[ Attached. Press Ctrl-C to stop recording. ]\n%!"; let%bind () = stop in detach attachment