mirror of
https://github.com/badaix/snapcast.git
synced 2025-05-25 23:16:14 +02:00
pid file
git-svn-id: svn://elaine/murooma/trunk@329 d8a302eb-03bc-478d-80e4-98257eca68ef
This commit is contained in:
parent
c40bfda64c
commit
a51c000a2d
6 changed files with 120 additions and 53 deletions
|
@ -9,7 +9,7 @@
|
|||
#include <boost/lexical_cast.hpp>
|
||||
#include <boost/program_options.hpp>
|
||||
|
||||
#include "common/utils.h"
|
||||
#include "common/daemon.h"
|
||||
#include "common/log.h"
|
||||
#include "common/signalHandler.h"
|
||||
#include "controller.h"
|
||||
|
@ -95,7 +95,7 @@ int main (int argc, char *argv[])
|
|||
std::clog.rdbuf(new Log("snapclient", LOG_DAEMON));
|
||||
if (runAsDaemon)
|
||||
{
|
||||
daemonize();
|
||||
daemonize("/var/run/snapclient.pid");
|
||||
std::clog << kLogNotice << "daemon started" << std::endl;
|
||||
}
|
||||
logS(kLogNotice) << "daemon started" << std::endl;
|
||||
|
@ -119,6 +119,7 @@ int main (int argc, char *argv[])
|
|||
usleep(100*1000);
|
||||
|
||||
controller.stop();
|
||||
daemonShutdown();
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue