diff options
author | Sam Atkins <atkinssj@serenityos.org> | 2023-01-22 19:54:23 +0000 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-01-25 14:27:45 +0100 |
commit | 8297516f89d98a8586c03838794417ef0f2fd744 (patch) | |
tree | d9c70c33b4ade7b968c5a588b3f428075e2908e4 /Userland | |
parent | 00b897af8f362c360c9e116f314d593155874478 (diff) | |
download | serenity-8297516f89d98a8586c03838794417ef0f2fd744.zip |
FileManager: Use Core::Process::set_name()
Diffstat (limited to 'Userland')
-rw-r--r-- | Userland/Applications/FileManager/main.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Userland/Applications/FileManager/main.cpp b/Userland/Applications/FileManager/main.cpp index 17c4cb72fa..8bb260206a 100644 --- a/Userland/Applications/FileManager/main.cpp +++ b/Userland/Applications/FileManager/main.cpp @@ -1,6 +1,6 @@ /* * Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org> - * Copyright (c) 2021, Sam Atkins <atkinssj@serenityos.org> + * Copyright (c) 2021-2023, Sam Atkins <atkinssj@serenityos.org> * Copyright (c) 2021, Mustafa Quraish <mustafa@cs.toronto.edu> * Copyright (c) 2022, the SerenityOS developers. * @@ -20,6 +20,7 @@ #include <LibConfig/Listener.h> #include <LibCore/ArgsParser.h> #include <LibCore/File.h> +#include <LibCore/Process.h> #include <LibCore/StandardPaths.h> #include <LibCore/System.h> #include <LibDesktop/Launcher.h> @@ -342,9 +343,7 @@ bool add_launch_handler_actions_to_menu(RefPtr<GUI::Menu>& menu, DirectoryView c ErrorOr<int> run_in_desktop_mode() { - constexpr char const* process_name = "FileManager (Desktop)"; - set_process_name(process_name, strlen(process_name)); - pthread_setname_np(pthread_self(), process_name); + (void)Core::Process::set_name("FileManager (Desktop)"sv, Core::Process::SetThreadName::Yes); auto window = TRY(GUI::Window::try_create()); window->set_title("Desktop Manager"); |