summaryrefslogtreecommitdiff
path: root/Kernel/Syscalls/execve.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-07 12:53:28 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-07 13:53:14 +0200
commit55b0b06897b7160b5fbc18ff9186a2242bbdf318 (patch)
tree02ba4614e201ed5ca777e9de392c30e1ed8b935e /Kernel/Syscalls/execve.cpp
parentdb2e67fd53facb5120f565bff761abf9a6d99cb6 (diff)
downloadserenity-55b0b06897b7160b5fbc18ff9186a2242bbdf318.zip
Kernel: Store process names as KString
Diffstat (limited to 'Kernel/Syscalls/execve.cpp')
-rw-r--r--Kernel/Syscalls/execve.cpp6
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();