summaryrefslogtreecommitdiffstats
path: root/src/pvsDaemon.cpp
diff options
context:
space:
mode:
authorFabian Schillinger2010-11-01 17:35:27 +0100
committerFabian Schillinger2010-11-01 17:35:27 +0100
commitea3fb17345e5f82db9f2e98a8062e95797700ace (patch)
tree1da0d1a8ec9455364386af78762d0f6fed187824 /src/pvsDaemon.cpp
parentProcess start/stop/view functionality (diff)
parent[PVSGUI] No X required for --help and --version (diff)
downloadpvs-ea3fb17345e5f82db9f2e98a8062e95797700ace.tar.gz
pvs-ea3fb17345e5f82db9f2e98a8062e95797700ace.tar.xz
pvs-ea3fb17345e5f82db9f2e98a8062e95797700ace.zip
Merge branch 'master' of openslx.org:pvs
Conflicts: CMakeLists.txt src/core/pvsConnectionManager.cpp src/pvs.cpp src/pvs.h
Diffstat (limited to 'src/pvsDaemon.cpp')
-rw-r--r--src/pvsDaemon.cpp15
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(