daemon.h 835 B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 2012 The Chromium Authors. All rights reserved.
  2. // Use of this source code is governed by a BSD-style license that can be
  3. // found in the LICENSE file.
  4. #ifndef TOOLS_ANDROID_COMMON_DAEMON_H_
  5. #define TOOLS_ANDROID_COMMON_DAEMON_H_
  6. namespace base {
  7. class CommandLine;
  8. }
  9. namespace tools {
  10. bool HasHelpSwitch(const base::CommandLine& command_line);
  11. bool HasNoSpawnDaemonSwitch(const base::CommandLine& command_line);
  12. void ShowHelp(const char* program,
  13. const char* extra_title,
  14. const char* extra_descriptions);
  15. // Spawns a daemon process and exits the current process with exit_status.
  16. // Any code executed after this function returns will be executed in the
  17. // spawned daemon process.
  18. void SpawnDaemon(int exit_status);
  19. } // namespace tools
  20. #endif // TOOLS_ANDROID_COMMON_DAEMON_H_