diff --git a/src/bin_signer/socket_daemon.ml b/src/bin_signer/socket_daemon.ml index baff8e901..5b6293e30 100644 --- a/src/bin_signer/socket_daemon.ml +++ b/src/bin_signer/socket_daemon.ml @@ -65,11 +65,13 @@ let run (cctxt : #Client_context.wallet) path ?magic_bytes ~check_high_watermark -% s host_name host -% s service_name service) | Unix path -> - Sys.set_signal Sys.sigint (Signal_handle begin fun _ -> - Format.printf "Removing the local socket file and quitting.@." ; - Unix.unlink path ; - exit 0 - end) ; + List.iter begin fun signal -> + Sys.set_signal signal (Signal_handle begin fun _ -> + Format.printf "Removing the local socket file and quitting.@." ; + Unix.unlink path ; + exit 0 + end) + end Sys.[sigint ; sigterm] ; log Tag.DSL.(fun f -> f "Accepting UNIX requests on %s" -% t event "accepting_unix_requests"