diff options
Diffstat (limited to 'src/pvsDaemon.cpp')
| -rw-r--r-- | src/pvsDaemon.cpp | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/pvsDaemon.cpp b/src/pvsDaemon.cpp index 584a65d..1784a14 100644 --- a/src/pvsDaemon.cpp +++ b/src/pvsDaemon.cpp @@ -64,6 +64,9 @@ int main(int argc, char** argv) bool _daemon = false; int frequency = 5; int port = -1; +#ifdef as_daemon + bool no_fork = false; +#endif QCoreApplication app(argc, argv); app.setOrganizationName("openslx"); @@ -119,11 +122,14 @@ int main(int argc, char** argv) { "freq", required_argument, 0, 'f' }, { "client", required_argument, 0, 'e' }, { "script", required_argument, 0, 's' }, +#ifdef as_daemon + { "no-fork", no_argument, 0, 'F' }, +#endif { 0, 0, 0, 0 }, }; /* getopt_long stores the option index here. */ - int c = getopt_long(argc, argv, "hovdc:f:e:s:p:", long_options, + int c = getopt_long(argc, argv, "hvodc:f:e:s:p:", long_options, &option_index); option_index++; if (c == -1) @@ -226,6 +232,13 @@ int main(int argc, char** argv) } break; } +#ifdef as_daemon + case 'F': + { + no_fork = true; + break; + } +#endif case '?': { ConsoleLog writeError( |
