mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-30 12:49:19 +00:00
LibCore: Use Core::Environment::raw_environ() instead of environment()
This commit is contained in:
parent
40b04d4da5
commit
c2bc07ef7c
Notes:
sideshowbarker
2024-07-17 01:51:00 +09:00
Author: https://github.com/AtkinsSJ
Commit: c2bc07ef7c
Pull-request: https://github.com/SerenityOS/serenity/pull/23018
Reviewed-by: https://github.com/ADKaster ✅
Reviewed-by: https://github.com/DanShaders
Reviewed-by: https://github.com/alimpfard
Reviewed-by: https://github.com/shannonbooth
4 changed files with 8 additions and 18 deletions
|
@ -9,6 +9,7 @@
|
|||
#include "Command.h"
|
||||
#include <AK/Format.h>
|
||||
#include <AK/ScopeGuard.h>
|
||||
#include <LibCore/Environment.h>
|
||||
#include <LibCore/File.h>
|
||||
#include <LibCore/System.h>
|
||||
#include <fcntl.h>
|
||||
|
@ -30,7 +31,7 @@ ErrorOr<OwnPtr<Command>> Command::create(StringView command, char const* const a
|
|||
posix_spawn_file_actions_adddup2(&file_actions, stdout_fds[1], STDOUT_FILENO);
|
||||
posix_spawn_file_actions_adddup2(&file_actions, stderr_fds[1], STDERR_FILENO);
|
||||
|
||||
auto pid = TRY(Core::System::posix_spawnp(command, &file_actions, nullptr, const_cast<char**>(arguments), System::environment()));
|
||||
auto pid = TRY(Core::System::posix_spawnp(command, &file_actions, nullptr, const_cast<char**>(arguments), Core::Environment::raw_environ()));
|
||||
|
||||
posix_spawn_file_actions_destroy(&file_actions);
|
||||
ArmedScopeGuard runner_kill { [&pid] { kill(pid, SIGKILL); } };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue