Skip to content

Commit

Permalink
Restore default SIGINT behavior after taking snapshot
Browse files Browse the repository at this point in the history
This feels like a hack, but it works for now pending discussion with
async devs.

Signed-off-by: Tudor Brindus <[email protected]>
  • Loading branch information
Xyene committed Feb 17, 2024
1 parent 9846bd7 commit 50a09f5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/trace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 50a09f5

Please sign in to comment.