mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 11:15:35 -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
a7516689b1
commit
d8234b0189
1 changed files with 1 additions and 0 deletions
|
|
@ -935,6 +935,7 @@ module Unix_tcp_server_ = struct
|
||||||
|
|
||||||
(* how to handle a single client *)
|
(* how to handle a single client *)
|
||||||
let handle_client_unix_ (client_sock : Unix.file_descr) : unit =
|
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_RCVTIMEO self.timeout);
|
||||||
Unix.(setsockopt_float client_sock SO_SNDTIMEO self.timeout);
|
Unix.(setsockopt_float client_sock SO_SNDTIMEO self.timeout);
|
||||||
let oc =
|
let oc =
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue