Skip to content

Commit

Permalink
correctly handle the SIGINT signal
Browse files Browse the repository at this point in the history
Ignore-this: ea0c2dbb5cba430cc586a66d26f094d1

darcs-hash:20110812211135-c41ad-ed9759f105d138c264cca67d0a0cdefda1a5f0a7
  • Loading branch information
jeremiedimino committed Aug 12, 2011
1 parent 7a791ae commit 4b8ce2b
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/uTop_console.ml
Original file line number Diff line number Diff line change
Expand Up @@ -439,8 +439,12 @@ let rec read_input term prompt buffer len =
end else
return ()
in
(* Restore the Lwt signal handler for SIGINT (Toploop catches it). *)
Lwt_unix.reinstall_signal_handler Sys.sigint;
(new read_line ~term ~prompt:prompt_to_display)#run
finally
(* Toploop need to catch the SIGINT signal. *)
Sys.catch_break true;
LTerm.flush term
) in

Expand Down

0 comments on commit 4b8ce2b

Please sign in to comment.