mirror of
https://github.com/c-cube/tiny_httpd.git
synced 2025-12-06 03:05:29 -05:00
Clarify why we do SIGINT/SIGHUP shenanigans
This commit is contained in:
parent
763f7e50a4
commit
61fcf3fda7
1 changed files with 2 additions and 0 deletions
|
|
@ -957,6 +957,8 @@ module Unix_tcp_server_ = struct
|
|||
try
|
||||
let client_sock, _ = Unix.accept sock in
|
||||
Unix.setsockopt client_sock Unix.TCP_NODELAY true;
|
||||
(* Block INT/HUP while cloning to avoid children handling them.
|
||||
When thread gets them, our Unix.accept raises neatly. *)
|
||||
ignore Unix.(sigprocmask SIG_BLOCK Sys.[ sigint; sighup ]);
|
||||
self.new_thread (fun () ->
|
||||
try
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue