Don't let threads handle SIGINT/SIGHUP

It's common for applications to use these signals to trigger a graceful
shutdown.
This commit is contained in:
Stéphane Lavergne 2023-08-07 10:49:42 -04:00
parent 60dc366bd2
commit 8f30c0dc9d

View file

@ -935,6 +935,7 @@ module Unix_tcp_server_ = struct
(* how to handle a single client *)
let handle_client_unix_ (client_sock : Unix.file_descr) : unit =
ignore Unix.(sigprocmask SIG_BLOCK Sys.[ sigint; sighup ]);
Unix.(setsockopt_float client_sock SO_RCVTIMEO self.timeout);
Unix.(setsockopt_float client_sock SO_SNDTIMEO self.timeout);
let oc =