pocoproject / poco

The POCO C++ Libraries are powerful cross-platform C++ libraries for building network- and internet-based applications that run on desktop, server, mobile, IoT, and embedded systems.
https://pocoproject.org
Other
8.04k stars 2.11k forks source link

ServerApplication waitForTerminationRequest terminate #4546

Closed micheleselea closed 1 month ago

micheleselea commented 1 month ago

On Linux implementation waitForTerminationRequest is configured for catching SIGTERM SIGQUIT and SIGINT only when POCO_ENABLE_DEBUGGER env is enabled. The Poco::Util::ServerApplication::terminate(); function should "Sends a friendly termination request to the application." calls Poco::Process::requestTermination(Process::id()); that do a kill(pid, SIGINT) Probably we should alays caught SIGINT or change che requestTermination function

micheleselea commented 1 month ago

Never mind, I found that is true only with POCO_ENABLE_DEBUGGER defined as environment, otherwise all should work as expected