merge
This commit is contained in:
commit
bebde5dba0
@ -4368,6 +4368,9 @@ we force server id to 2, but this MySQL server will not act as a slave.");
|
|||||||
: mysqld_unix_port),
|
: mysqld_unix_port),
|
||||||
mysqld_port,
|
mysqld_port,
|
||||||
MYSQL_COMPILATION_COMMENT);
|
MYSQL_COMPILATION_COMMENT);
|
||||||
|
#if defined(_WIN32) && !defined(EMBEDDED_LIBRARY)
|
||||||
|
Service.SetRunning();
|
||||||
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/* Signal threads waiting for server to be started */
|
/* Signal threads waiting for server to be started */
|
||||||
|
@ -255,10 +255,6 @@ void NTService::ServiceMain(DWORD argc, LPTSTR *argv)
|
|||||||
if (!pService->StartService())
|
if (!pService->StartService())
|
||||||
goto error;
|
goto error;
|
||||||
|
|
||||||
// Check that the service is now running.
|
|
||||||
if (!pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0))
|
|
||||||
goto error;
|
|
||||||
|
|
||||||
// wait for exit event
|
// wait for exit event
|
||||||
WaitForSingleObject (pService->hExitEvent, INFINITE);
|
WaitForSingleObject (pService->hExitEvent, INFINITE);
|
||||||
|
|
||||||
@ -274,9 +270,18 @@ error:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
starts the appliaction thread.
|
|
||||||
*/
|
void NTService::SetRunning()
|
||||||
|
{
|
||||||
|
if (pService)
|
||||||
|
pService->SetStatus(SERVICE_RUNNING,NO_ERROR, 0, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* ------------------------------------------------------------------------
|
||||||
|
StartService() - starts the application thread
|
||||||
|
-------------------------------------------------------------------------- */
|
||||||
|
|
||||||
BOOL NTService::StartService()
|
BOOL NTService::StartService()
|
||||||
{
|
{
|
||||||
|
@ -60,7 +60,19 @@ class NTService
|
|||||||
BOOL IsService(LPCSTR ServiceName);
|
BOOL IsService(LPCSTR ServiceName);
|
||||||
BOOL got_service_option(char **argv, char *service_option);
|
BOOL got_service_option(char **argv, char *service_option);
|
||||||
BOOL is_super_user();
|
BOOL is_super_user();
|
||||||
void Stop(void); //to be called from app. to stop service
|
|
||||||
|
/*
|
||||||
|
SetRunning() is to be called by the application
|
||||||
|
when initialization completes and it can accept
|
||||||
|
stop request
|
||||||
|
*/
|
||||||
|
void SetRunning(void);
|
||||||
|
|
||||||
|
/*
|
||||||
|
Stop() is to be called by the application to stop
|
||||||
|
the service
|
||||||
|
*/
|
||||||
|
void Stop(void);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
LPSTR ServiceName;
|
LPSTR ServiceName;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user