mirror of
https://github.com/debauchee/barrier.git
synced 2026-02-08 12:53:53 +08:00
performance fixes on win32 plus clean up of some warnings. also
improved error messages when uninstalling service.
This commit is contained in:
@@ -35,12 +35,12 @@ CUnixPlatform::installDaemon(
|
||||
return true;
|
||||
}
|
||||
|
||||
bool
|
||||
CUnixPlatform::EResult
|
||||
CUnixPlatform::uninstallDaemon(
|
||||
const char*)
|
||||
{
|
||||
// daemons don't require special installation
|
||||
return true;
|
||||
return kSuccess;
|
||||
}
|
||||
|
||||
int
|
||||
@@ -85,12 +85,20 @@ CUnixPlatform::daemonize(
|
||||
dup(1);
|
||||
|
||||
// hook up logger
|
||||
setDaemonLogger(name);
|
||||
installDaemonLogger(name);
|
||||
|
||||
// invoke function
|
||||
return func(this, 1, &name);
|
||||
}
|
||||
|
||||
void
|
||||
CUnixPlatform::installDaemonLogger(
|
||||
const char* name)
|
||||
{
|
||||
openlog(name, 0, LOG_DAEMON);
|
||||
CLog::setOutputter(&CUnixPlatform::deamonLogger);
|
||||
}
|
||||
|
||||
int
|
||||
CUnixPlatform::restart(
|
||||
RestartFunc func,
|
||||
@@ -195,14 +203,6 @@ CUnixPlatform::addPathComponent(
|
||||
return path;
|
||||
}
|
||||
|
||||
void
|
||||
CUnixPlatform::setDaemonLogger(
|
||||
const char* name)
|
||||
{
|
||||
openlog(name, 0, LOG_DAEMON);
|
||||
CLog::setOutputter(&CUnixPlatform::deamonLogger);
|
||||
}
|
||||
|
||||
bool
|
||||
CUnixPlatform::deamonLogger(
|
||||
int priority,
|
||||
|
||||
Reference in New Issue
Block a user