mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-29 20:29:18 +00:00
LibCore/Process: Make all spawn
overloads return ErrorOr<Process>
This commit is contained in:
parent
ddd15e96b6
commit
4a731b3858
Notes:
github-actions[bot]
2024-11-19 22:28:35 +00:00
Author: https://github.com/stasoid
Commit: 4a731b3858
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/2377
Reviewed-by: https://github.com/ADKaster ✅
6 changed files with 22 additions and 27 deletions
|
@ -74,9 +74,8 @@ public:
|
|||
static ErrorOr<Process> spawn(ProcessSpawnOptions const& options);
|
||||
static Process current();
|
||||
|
||||
// FIXME: Make the following 2 functions return Process instance or delete them.
|
||||
static ErrorOr<pid_t> spawn(StringView path, ReadonlySpan<ByteString> arguments, ByteString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No);
|
||||
static ErrorOr<pid_t> spawn(StringView path, ReadonlySpan<StringView> arguments, ByteString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No);
|
||||
static ErrorOr<Process> spawn(StringView path, ReadonlySpan<ByteString> arguments, ByteString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No);
|
||||
static ErrorOr<Process> spawn(StringView path, ReadonlySpan<StringView> arguments, ByteString working_directory = {}, KeepAsChild keep_as_child = KeepAsChild::No);
|
||||
|
||||
static ErrorOr<String> get_name();
|
||||
enum class SetThreadName {
|
||||
|
@ -96,7 +95,7 @@ public:
|
|||
ErrorOr<bool> wait_for_termination();
|
||||
|
||||
private:
|
||||
Process(pid_t pid)
|
||||
Process(pid_t pid = -1)
|
||||
: m_pid(pid)
|
||||
, m_should_disown(true)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue