Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(765)

Unified Diff: src/platform/metrics_daemon/main.cc

Issue 500117: Daemonize (fork()) and install metrics_daemon in the image for execution. (Closed)
Patch Set: rename do_fork to run_as_daemon Created 11 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/platform/metrics_daemon/debian/rules ('k') | src/platform/metrics_daemon/make_pkg.sh » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/metrics_daemon/main.cc
diff --git a/src/platform/metrics_daemon/main.cc b/src/platform/metrics_daemon/main.cc
index 1ee2080d3da389e0745f96bf2bb0fcc99304c9b3..10348a12030c7433c4c5cd3d989e7c240b4790f8 100644
--- a/src/platform/metrics_daemon/main.cc
+++ b/src/platform/metrics_daemon/main.cc
@@ -3,9 +3,14 @@
// found in the LICENSE file.
+#include <gflags/gflags.h>
+
#include "platform/metrics_daemon/metrics_daemon.h"
+DEFINE_bool(daemon, true, "run as daemon (use -nodaemon for debugging)");
+
int main(int argc, char** argv) {
MetricsDaemon::MetricsDaemon d;
- d.Run(false);
+ google::ParseCommandLineFlags(&argc, &argv, true);
+ d.Run(FLAGS_daemon, false);
}
« no previous file with comments | « src/platform/metrics_daemon/debian/rules ('k') | src/platform/metrics_daemon/make_pkg.sh » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698