diff --git a/examples/server/server.cpp b/examples/server/server.cpp index 53ad9239e..92090b920 100644 --- a/examples/server/server.cpp +++ b/examples/server/server.cpp @@ -3566,6 +3566,7 @@ int main(int argc, char ** argv) { sigemptyset (&sigint_action.sa_mask); sigint_action.sa_flags = 0; sigaction(SIGINT, &sigint_action, NULL); + sigaction(SIGTERM, &sigint_action, NULL); #elif defined (_WIN32) auto console_ctrl_handler = +[](DWORD ctrl_type) -> BOOL { return (ctrl_type == CTRL_C_EVENT) ? (signal_handler(SIGINT), true) : false;