8#include "daq/slc/system/Daemon.h"
10#include <daq/slc/system/LogFile.h>
12#include <daq/slc/base/StringUtil.h>
19bool Daemon::start(
const char* title,
20 int argc,
char** argv,
21 int nargc,
const char* msg)
25 bool isdaemon =
false;
26 for (
int i = 1; i < argc; i++) {
27 if (strcmp(argv[i],
"-d") == 0) {
30 }
else if (strcmp(argv[i],
"-h") == 0) {
31 LogFile::debug(
"Usage : %s %s [-d]", argv[0], msg);
35 if (argc < nargc + 1) {
36 LogFile::debug(
"Usage : %s %s [-d]", argv[0], msg);
39 LogFile::open(StringUtil::form(
"%s/%s", argv[0], title));
49 return execv(g_argv[0], g_argv) != -1;
52int Daemon::g_argc = 0;
53char** Daemon::g_argv = NULL;
Abstract base class for different kinds of events.