Shell: exit properly on SIGTERM.

This commit is contained in:
Grégoire Henry 2017-02-27 22:25:56 +01:00
parent 348aec3d10
commit 0b27503f30

View File

@ -158,7 +158,8 @@ let init_rpc (rpc_config: Node_config_file.rpc) node =
let init_signal () =
let handler id = try Lwt_exit.exit id with _ -> () in
ignore (Lwt_unix.on_signal Sys.sigint handler : Lwt_unix.signal_handler_id)
ignore (Lwt_unix.on_signal Sys.sigint handler : Lwt_unix.signal_handler_id) ;
ignore (Lwt_unix.on_signal Sys.sigterm handler : Lwt_unix.signal_handler_id)
let run ?verbosity ?sandbox (config : Node_config_file.t) =
Lwt_utils.create_dir config.data_dir >>= fun () ->