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 e2e07f5
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/trace.ml
Original file line number Diff line number Diff line change
Expand Up @@ -497,6 +497,7 @@ module Make_commands (Backend : Backend_intf.S) = struct
Async_unix.Signal.handle ~stop [ Signal.int ] ~f:(fun (_ : Signal.t) ->
Core.eprintf "[ Got signal, detaching... ]\n%!";
Ivar.fill_if_empty done_ivar ());
Deferred.upon stop (fun () -> 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 e2e07f5

Please sign in to comment.