On Thursday, 15 March 2018 at 16:51:59 UTC, Jim King wrote:
I am trying to add graceful shutdown support to a test harness.
In the test harness, a server class consumes a thread to accept connections and service them. In order to stop the server, it has to be interrupted. This interruption mechanism is based on core.sync.condition.

I want to add a signal handler so that if SIGINT is received, the server is interrupted and stops gracefully.


signalfd [1] is a good solution on Linux.

core.sys.linux.sys.signalfd;

[1]: http://man7.org/linux/man-pages/man2/signalfd.2.html

Reply via email to