mirror of
https://github.com/badaix/snapcast.git
synced 2025-07-29 14:28:42 +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
|
@ -3,7 +3,7 @@
|
|||
#include <memory>
|
||||
#include "common/timeDefs.h"
|
||||
#include "common/signalHandler.h"
|
||||
#include "common/utils.h"
|
||||
#include "common/daemon.h"
|
||||
#include "message/sampleFormat.h"
|
||||
#include "message/message.h"
|
||||
#include "pcmEncoder.h"
|
||||
|
@ -56,11 +56,11 @@ int main(int argc, char* argv[])
|
|||
|
||||
if (runAsDaemon)
|
||||
{
|
||||
daemonize();
|
||||
daemonize("/var/run/snapserver.pid");
|
||||
syslog (LOG_NOTICE, "First daemon started.");
|
||||
}
|
||||
|
||||
openlog ("firstdaemon", LOG_PID, LOG_DAEMON);
|
||||
openlog("firstdaemon", LOG_PID, LOG_DAEMON);
|
||||
|
||||
using namespace std; // For atoi.
|
||||
|
||||
|
@ -159,8 +159,8 @@ int main(int argc, char* argv[])
|
|||
std::cerr << "Exception: " << e.what() << std::endl;
|
||||
}
|
||||
|
||||
syslog (LOG_NOTICE, "First daemon terminated.");
|
||||
cout << "Terminated\n";
|
||||
syslog(LOG_NOTICE, "First daemon terminated.");
|
||||
daemonShutdown();
|
||||
closelog();
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue