diff options
Diffstat (limited to 'Userland/Libraries/LibCore/Process.h')
-rw-r--r-- | Userland/Libraries/LibCore/Process.h | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/Userland/Libraries/LibCore/Process.h b/Userland/Libraries/LibCore/Process.h index 54cd6a52e8..9041f0ee0d 100644 --- a/Userland/Libraries/LibCore/Process.h +++ b/Userland/Libraries/LibCore/Process.h @@ -1,6 +1,7 @@ /* * Copyright (c) 2021, Andreas Kling <kling@serenityos.org> * Copyright (c) 2022, MacDue <macdue@dueutil.tech> + * Copyright (c) 2023, Sam Atkins <atkinssj@serenityos.org> * * SPDX-License-Identifier: BSD-2-Clause */ @@ -17,6 +18,13 @@ public: static ErrorOr<pid_t> spawn(StringView path, Span<DeprecatedString const> arguments, DeprecatedString working_directory = {}); static ErrorOr<pid_t> spawn(StringView path, Span<StringView const> arguments, DeprecatedString working_directory = {}); static ErrorOr<pid_t> spawn(StringView path, Span<char const* const> arguments = {}, DeprecatedString working_directory = {}); + + static ErrorOr<String> get_name(); + enum class SetThreadName { + No, + Yes, + }; + static ErrorOr<void> set_name(StringView, SetThreadName = SetThreadName::No); }; } |