mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
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:
parent
60dc366bd2
commit
8f30c0dc9d
1 changed files with 1 additions and 0 deletions
|
|
@ -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 =
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue