mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 06:17:35 +00:00
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.
This commit is contained in:
parent
92363a4ef8
commit
dd82f68326
6 changed files with 48 additions and 41 deletions
|
@ -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());
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue