mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-22 16:02:29 +02:00
* use xcode-select to find correct paths for iOS build
* add iOS definitions for CMake * ServerApplication on Android must use events instead of signals to wait for server termination.
This commit is contained in:
@@ -84,7 +84,7 @@ SERVICE_STATUS ServerApplication::_serviceStatus;
|
||||
SERVICE_STATUS_HANDLE ServerApplication::_serviceStatusHandle = 0;
|
||||
#endif
|
||||
#endif
|
||||
#if defined(POCO_VXWORKS)
|
||||
#if defined(POCO_VXWORKS) || defined(POCO_ANDROID)
|
||||
Poco::Event ServerApplication::_terminate;
|
||||
#endif
|
||||
|
||||
@@ -122,7 +122,7 @@ void ServerApplication::terminate()
|
||||
{
|
||||
#if defined(POCO_OS_FAMILY_WINDOWS)
|
||||
_terminate.set();
|
||||
#elif defined(POCO_VXWORKS)
|
||||
#elif defined(POCO_VXWORKS) || defined(POCO_ANDROID)
|
||||
_terminate.set();
|
||||
#else
|
||||
Poco::Process::requestTermination(Process::id());
|
||||
@@ -590,6 +590,7 @@ void ServerApplication::defineOptions(OptionSet& options)
|
||||
//
|
||||
void ServerApplication::waitForTerminationRequest()
|
||||
{
|
||||
#ifndef POCO_ANDROID
|
||||
sigset_t sset;
|
||||
sigemptyset(&sset);
|
||||
if (!std::getenv("POCO_ENABLE_DEBUGGER"))
|
||||
@@ -601,6 +602,9 @@ void ServerApplication::waitForTerminationRequest()
|
||||
sigprocmask(SIG_BLOCK, &sset, NULL);
|
||||
int sig;
|
||||
sigwait(&sset, &sig);
|
||||
#else // POCO_ANDROID
|
||||
_terminate.wait();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user