1
0
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:
reggie@ubuntu.(none)
2005-09-13 14:53:19 -05:00
parent 6985adffc1
commit 31be8fb694
10 changed files with 58 additions and 31 deletions

View File

@ -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)