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

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

Issue 2055008: Init: Start Update Engine at startup (Closed) Base URL: ssh://git@chromiumos-git/chromeos
Patch Set: Created 10 years, 7 months 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/init/update-engine.conf ('k') | src/platform/update_engine/update_attempter.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform/update_engine/main.cc
diff --git a/src/platform/update_engine/main.cc b/src/platform/update_engine/main.cc
index b2f14c4b50b9d71694b82a34a43c5ef60fba87cd..c9ff5d707dd2bc989fddf91b2414f2bb7c6eea86 100644
--- a/src/platform/update_engine/main.cc
+++ b/src/platform/update_engine/main.cc
@@ -19,6 +19,8 @@ extern "C" {
DEFINE_bool(logtostderr, false,
"Write logs to stderr instead of to a file in log_dir.");
+DEFINE_bool(forground, false,
Chris Masone 2010/05/10 22:46:52 foreground
+ "Don't daemon()ize; run in forground.");
using std::string;
using std::tr1::shared_ptr;
@@ -92,6 +94,9 @@ int main(int argc, char** argv) {
logging::LOG_ONLY_TO_FILE),
logging::DONT_LOCK_LOG_FILE,
logging::APPEND_TO_OLD_LOG_FILE);
+ if (!FLAGS_forground)
Chris Masone 2010/05/10 22:46:52 foreground
+ PLOG_IF(FATAL, daemon(0, 0) == 1) << "daemon() failed";
+
LOG(INFO) << "Chrome OS Update Engine starting";
// Create the single GMainLoop
« no previous file with comments | « src/platform/init/update-engine.conf ('k') | src/platform/update_engine/update_attempter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698