summaryrefslogtreecommitdiffstats
path: root/tools/android/common/daemon.h
blob: 99faf72b8e0fa40c705c97b01ca5f4062d2bdacf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
// Copyright (c) 2012 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef TOOLS_ANDROID_COMMON_DAEMON_H_
#define TOOLS_ANDROID_COMMON_DAEMON_H_

namespace base {
class CommandLine;
}

namespace tools {

bool HasHelpSwitch(const base::CommandLine& command_line);

bool HasNoSpawnDaemonSwitch(const base::CommandLine& command_line);

void ShowHelp(const char* program,
              const char* extra_title,
              const char* extra_descriptions);

// Spawns a daemon process and exits the current process with exit_status.
// Any code executed after this function returns will be executed in the
// spawned daemon process.
void SpawnDaemon(int exit_status);

}  // namespace tools

#endif  // TOOLS_ANDROID_COMMON_DAEMON_H_