handy-httpd icon indicating copy to clipboard operation
handy-httpd copied to clipboard

[macOS] HttpRequest.startInNewThread requires some way to stop it when the user CTRL+C

Open MrcSnm opened this issue 2 months ago • 0 comments

Is your feature request related to a problem? Please describe. On macOS, I've tried to register a SIGINT handler which executes server.stop(). But what actually happens when it is called, the thread is kept alive and starts with 100% CPU usage

Describe the solution you'd like I don't really know how to fix it yet, I've tried blocking the signal mask before spawning the threads and after that registering the signal handler, but that doesn't fix the issue. The XCode debugger also doesn't seem to be able to show when the SIGINT handler is executed.

MrcSnm avatar Oct 31 '25 13:10 MrcSnm