Signer: remove socket on all more termination signals
This commit is contained in:
parent
d1c46b5cf2
commit
56fa339937
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user