summaryrefslogtreecommitdiff
path: root/Kernel/Coredump.cpp
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-09 11:36:40 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-09 21:25:10 +0200
commitdd82f6832612a03ad51f577b60d289fea4bee169 (patch)
tree6d17e0651835073fd9a44698e9716e58033744bf /Kernel/Coredump.cpp
parent92363a4ef89ba208c62effbc48c08fcd872450ea (diff)
downloadserenity-dd82f6832612a03ad51f577b60d289fea4bee169.zip
Kernel: Use KString all the way in sys$execve()
This patch converts all the usage of AK::String around sys$execve() to using KString instead, allowing us to catch and propagate OOM errors. It also required changing the kernel CommandLine helper class to return a vector of KString for the userspace init program arguments.
Diffstat (limited to 'Kernel/Coredump.cpp')
-rw-r--r--Kernel/Coredump.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/Kernel/Coredump.cpp b/Kernel/Coredump.cpp
index 7b938d97ef..88300eb932 100644
--- a/Kernel/Coredump.cpp
+++ b/Kernel/Coredump.cpp
@@ -194,13 +194,13 @@ KResult Coredump::create_notes_process_data(auto& builder) const
{
auto arguments_array = process_obj.add_array("arguments"sv);
for (auto& argument : m_process->arguments())
- arguments_array.add(argument);
+ arguments_array.add(argument.view());
}
{
auto environment_array = process_obj.add_array("environment"sv);
for (auto& variable : m_process->environment())
- environment_array.add(variable);
+ environment_array.add(variable.view());
}
}