Chromium Code Reviews| 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 |