Android-cuttlefish cvd tool
stop.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2023 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17#pragma once
18
19#include <sys/types.h>
20
21#include <string>
22
25
26namespace cuttlefish {
27
28/*
29 * Runs stop_cvd for all cuttlefish instances found based on run_cvd processes,
30 * and send SIGKILL to the run_cvd processes.
31 */
32Result<void> KillAllCuttlefishInstances(bool clear_runtime_dirs,
33 InstanceLockFileManager* lock_manager);
34
35Result<void> ForcefullyStopGroup(uid_t any_id_in_group,
36 InstanceLockFileManager* lock_manager);
37
39 std::string bin_path;
40 std::string home_dir;
43 std::vector<unsigned> instance_nums;
44};
46
47} // namespace cuttlefish
Definition: alloc_driver.h:21
Result< void > ForcefullyStopGroup(const uid_t any_id_in_group, InstanceLockFileManager *lock_manager)
Definition: stop.cpp:196
Result< void > RunStopCvd(StopCvdParams params)
Definition: stop.cpp:209
Result< void > KillAllCuttlefishInstances(bool clear_runtime_dirs, InstanceLockFileManager *lock_manager)
Definition: stop.cpp:176
tl::expected< T, StackTraceError< E > > Result
Definition: result_type.h:30
Definition: stop.h:38
bool clear_runtime_dirs
Definition: stop.h:42
std::vector< unsigned > instance_nums
Definition: stop.h:43
std::string home_dir
Definition: stop.h:40
std::string bin_path
Definition: stop.h:39
int wait_for_launcher_secs
Definition: stop.h:41