You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
made a http server var CrowCpp. It crashed when exit the server by Ctrl+C if handler was already running. I tried to stop the handler used atexit and signal like this
#include<csignal>
#include<crow.h>voidOnExitHandler()
{
// release sources here
}
voidOnSignalHandler(int signum)
{
if (signum == SIGINT)
{
OnExitHandler();
}
}
intmain()
{
std::atexit(&OnExitHandler);
signal(SIGINT, &OnSignalHandler);
crow::SimpleApp app;
// http server here
app.port(conf->server().port)
.multithreaded()
.loglevel(crow::LogLevel::Warning)
.run();
return0;
}
But it did not work. SIGINT signal was not processed in my handler function "OnSignalHandler".
So, How can I stop the running handler and release the sources before exit?
The text was updated successfully, but these errors were encountered:
My pr is blocked. The tests failed unfortunately. I don't have a Mac or Windows device, so there's no way to troubleshoot these errors.
The test was canceld on Windows because of the "Prepare dependencies" went error.
The test failed on task_timer on Macos-13. I dont have mac to roubleshoot the error and I think it is not related to the signal fix code.
made a http server var CrowCpp. It crashed when exit the server by Ctrl+C if handler was already running. I tried to stop the handler used atexit and signal like this
But it did not work. SIGINT signal was not processed in my handler function "OnSignalHandler".
So, How can I stop the running handler and release the sources before exit?
The text was updated successfully, but these errors were encountered: