OLD | NEW |
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include <signal.h> | 5 #include <signal.h> |
6 #include <stdlib.h> | 6 #include <stdlib.h> |
7 | 7 |
8 #if defined(OS_WIN) | 8 #if defined(OS_WIN) |
9 #include <windows.h> | 9 #include <windows.h> |
10 #endif | 10 #endif |
11 | 11 |
12 #include <iostream> | 12 #include <ostream> |
13 #include <fstream> | 13 #include <fstream> |
14 | 14 |
15 #include "base/at_exit.h" | 15 #include "base/at_exit.h" |
16 #include "base/command_line.h" | 16 #include "base/command_line.h" |
17 #include "base/file_path.h" | 17 #include "base/file_path.h" |
18 #include "base/file_util.h" | 18 #include "base/file_util.h" |
19 #include "base/logging.h" | 19 #include "base/logging.h" |
20 #include "base/memory/scoped_ptr.h" | 20 #include "base/memory/scoped_ptr.h" |
21 #include "base/string_number_conversions.h" | 21 #include "base/string_number_conversions.h" |
22 #include "base/string_split.h" | 22 #include "base/string_split.h" |
(...skipping 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
240 | 240 |
241 // Run until we receive command to shutdown. | 241 // Run until we receive command to shutdown. |
242 shutdown_event.Wait(); | 242 shutdown_event.Wait(); |
243 | 243 |
244 // We should not reach here since the service should never quit. | 244 // We should not reach here since the service should never quit. |
245 // TODO(jmikhail): register a listener for SIGTERM and break the | 245 // TODO(jmikhail): register a listener for SIGTERM and break the |
246 // message loop gracefully. | 246 // message loop gracefully. |
247 mg_stop(ctx); | 247 mg_stop(ctx); |
248 return (EXIT_SUCCESS); | 248 return (EXIT_SUCCESS); |
249 } | 249 } |
OLD | NEW |