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
24
25namespace cuttlefish {
26
27/*
28 * Runs stop_cvd for all cuttlefish instances found based on run_cvd processes,
29 * and send SIGKILL to the run_cvd processes.
30 */
31Result<void> KillAllCuttlefishInstances(bool clear_runtime_dirs);
32
33Result<void> ForcefullyStopGroup(uid_t any_id_in_group);
34
36 std::string bin_path;
37 std::string home_dir;
40 std::vector<unsigned> instance_nums;
41};
43
44} // namespace cuttlefish
Definition: alloc_driver.h:20
Result< void > RunStopCvd(StopCvdParams params)
Definition: stop.cpp:239
Result< void > KillAllCuttlefishInstances(bool clear_runtime_dirs)
Definition: stop.cpp:211
tl::expected< T, StackTraceError > Result
Definition: result_type.h:30
Result< void > ForcefullyStopGroup(const uid_t any_id_in_group)
Definition: stop.cpp:227
Definition: stop.h:35
bool clear_runtime_dirs
Definition: stop.h:39
std::vector< unsigned > instance_nums
Definition: stop.h:40
std::string home_dir
Definition: stop.h:37
std::string bin_path
Definition: stop.h:36
int wait_for_launcher_secs
Definition: stop.h:38