correctly handle the SIGINT signal
Ignore-this: ea0c2dbb5cba430cc586a66d26f094d1 darcs-hash:20110812211135-c41ad-ed9759f105d138c264cca67d0a0cdefda1a5f0a7
This commit is contained in:
parent
7a791ae5ef
commit
4b8ce2bf82
|
@ -439,8 +439,12 @@ let rec read_input term prompt buffer len =
|
||||||
end else
|
end else
|
||||||
return ()
|
return ()
|
||||||
in
|
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
|
(new read_line ~term ~prompt:prompt_to_display)#run
|
||||||
finally
|
finally
|
||||||
|
(* Toploop need to catch the SIGINT signal. *)
|
||||||
|
Sys.catch_break true;
|
||||||
LTerm.flush term
|
LTerm.flush term
|
||||||
) in
|
) in
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue