mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed the service bits of the IM
This commit is contained in:
@ -1,12 +1,16 @@
|
||||
#include <windows.h>
|
||||
#include <signal.h>
|
||||
#include "log.h"
|
||||
#include "options.h"
|
||||
#include "IMService.h"
|
||||
#include "manager.h"
|
||||
|
||||
IMService::IMService(void)
|
||||
{
|
||||
serviceName= "MySqlManager";
|
||||
displayName= "MySQL Manager";
|
||||
username= NULL;
|
||||
password= NULL;
|
||||
}
|
||||
|
||||
IMService::~IMService(void)
|
||||
@ -16,18 +20,25 @@ IMService::~IMService(void)
|
||||
void IMService::Stop()
|
||||
{
|
||||
ReportStatus(SERVICE_STOP_PENDING);
|
||||
|
||||
// stop the IM work
|
||||
raise(SIGTERM);
|
||||
}
|
||||
|
||||
void IMService::Run()
|
||||
void IMService::Run(DWORD argc, LPTSTR *argv)
|
||||
{
|
||||
// report to the SCM that we're about to start
|
||||
ReportStatus((DWORD)SERVICE_START_PENDING);
|
||||
|
||||
Options o;
|
||||
o.load(argc, argv);
|
||||
|
||||
// init goes here
|
||||
ReportStatus((DWORD)SERVICE_RUNNING);
|
||||
|
||||
// wait for main loop to terminate
|
||||
manager(o);
|
||||
o.cleanup();
|
||||
}
|
||||
|
||||
void IMService::Log(const char *msg)
|
||||
|
Reference in New Issue
Block a user