diff options
author | Andreas Kling <kling@serenityos.org> | 2021-09-07 12:53:28 +0200 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2021-09-07 13:53:14 +0200 |
commit | 55b0b06897b7160b5fbc18ff9186a2242bbdf318 (patch) | |
tree | 02ba4614e201ed5ca777e9de392c30e1ed8b935e /Kernel/Syscalls/execve.cpp | |
parent | db2e67fd53facb5120f565bff761abf9a6d99cb6 (diff) | |
download | serenity-55b0b06897b7160b5fbc18ff9186a2242bbdf318.zip |
Kernel: Store process names as KString
Diffstat (limited to 'Kernel/Syscalls/execve.cpp')
-rw-r--r-- | Kernel/Syscalls/execve.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Kernel/Syscalls/execve.cpp b/Kernel/Syscalls/execve.cpp index 5dbe3dfc5e..46cd482046 100644 --- a/Kernel/Syscalls/execve.cpp +++ b/Kernel/Syscalls/execve.cpp @@ -446,12 +446,12 @@ KResult Process::do_exec(NonnullRefPtr<FileDescription> main_program_description if (!validate_stack_size(arguments, environment)) return E2BIG; - auto parts = path.split('/'); + auto parts = path.split_view('/'); if (parts.is_empty()) return ENOENT; - auto new_process_name = parts.take_last(); - auto new_main_thread_name = TRY(KString::try_create(new_process_name)); + auto new_process_name = TRY(KString::try_create(parts.last())); + auto new_main_thread_name = TRY(new_process_name->try_clone()); auto main_program_metadata = main_program_description->metadata(); |