summaryrefslogtreecommitdiff
path: root/src/miavd.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/miavd.cc')
-rw-r--r--src/miavd.cc12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/miavd.cc b/src/miavd.cc
index 89e8990..3fec6e0 100644
--- a/src/miavd.cc
+++ b/src/miavd.cc
@@ -59,9 +59,7 @@ static const char usage_str[] =
" -h, --help Print this message and exit.\n"
" -D, --debug ddd Enable debug messages on 'ddd'; see documentation for details\n"
" -L, --logfile file Write output to file, instead of stderr.\n"
- /*
" -P, --pidfile file Write pid of the running daemon to file.\n"
- */
;
int main(int argc, char *argv[])
@@ -73,7 +71,7 @@ int main(int argc, char *argv[])
char *user = NULL;
char *group = NULL;
bool foreground = false;
- // std::string pidfile;
+ std::string pidfile;
unsigned int hugin_flags = 0;
@@ -88,7 +86,7 @@ int main(int argc, char *argv[])
{"help", no_argument, 0, 'h'},
{"version", no_argument, 0, 'v'},
{"debug", required_argument, 0, 'D'},
- //{"pidfile", required_argument, 0, 'P'},
+ {"pidfile", required_argument, 0, 'P'},
{"logfile", required_argument, 0, 'L'},
{0, 0, 0, 0}
};
@@ -125,11 +123,11 @@ int main(int argc, char *argv[])
hugin_flags |= HUG_FLAG_USE_FILTER;
hugin_filter = optarg;
break;
- /*
+
case 'P':
pidfile = optarg;
break;
- */
+
case '?':
case 'h':
printf("%s", version_str);
@@ -170,5 +168,5 @@ int main(int argc, char *argv[])
if(user) cuser = user;
if(group) cgroup = group;
- return daemon.run(cuser, cgroup, foreground);
+ return daemon.run(cuser, cgroup, foreground, pidfile);
}