/* * Copyright (c) 2021, Andreas Kling * Copyright (c) 2022, MacDue * Copyright (c) 2023, Sam Atkins * * SPDX-License-Identifier: BSD-2-Clause */ #pragma once #include #include namespace Core { class Process { public: enum class KeepAsChild { Yes, No }; static ErrorOr spawn(StringView path, ReadonlySpan arguments, DeprecatedString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No); static ErrorOr spawn(StringView path, ReadonlySpan arguments, DeprecatedString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No); static ErrorOr spawn(StringView path, ReadonlySpan arguments = {}, DeprecatedString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No); static ErrorOr get_name(); enum class SetThreadName { No, Yes, }; static ErrorOr set_name(StringView, SetThreadName = SetThreadName::No); }; }