fix: do not die if we fail to block a signal

This commit is contained in:
Simon Cruanes 2025-03-13 10:45:21 -04:00
parent c51a0a6bd4
commit dd88008a0a
No known key found for this signature in database
GPG key ID: EBFFF6F283F3A2B4

View file

@ -105,7 +105,7 @@ let with_handler ~ops:_ self f = f ()
let worker_loop (type st) ~block_signals ~(ops : st ops) (self : st) : unit = let worker_loop (type st) ~block_signals ~(ops : st ops) (self : st) : unit =
if block_signals then if block_signals then
List.iter List.iter
(fun signal -> Sys.set_signal signal Sys.Signal_ignore) (fun signal -> try Sys.set_signal signal Sys.Signal_ignore with _ -> ())
[ [
Sys.sigterm; Sys.sigterm;
Sys.sigpipe; Sys.sigpipe;