summaryrefslogtreecommitdiff
path: root/Kernel/Process.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2021-09-04 22:36:06 +0200
committerAndreas Kling <kling@serenityos.org>2021-09-04 23:11:04 +0200
commit3b995c6d01239cf2099b764917082284fea30c31 (patch)
tree9424990293525c0e5dda6d6178cdf6315729fe2d /Kernel/Process.h
parentba1a6ca971fcdd8ff145af995d2cbb963ec3f3c3 (diff)
downloadserenity-3b995c6d01239cf2099b764917082284fea30c31.zip
Kernel: Tidy up Process::try_create_user_process()
This function is currently only ever used to create the init process (SystemServer). It had a few idiosyncratic things about it that this patch cleans up: - Errors were returned in an int& out-param. - It had a path for non-0 process PIDs which was never taken.
Diffstat (limited to 'Kernel/Process.h')
-rw-r--r--Kernel/Process.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/Kernel/Process.h b/Kernel/Process.h
index 46dadded75..86cbc1d87e 100644
--- a/Kernel/Process.h
+++ b/Kernel/Process.h
@@ -179,7 +179,7 @@ public:
}
static RefPtr<Process> create_kernel_process(RefPtr<Thread>& first_thread, String&& name, void (*entry)(void*), void* entry_data = nullptr, u32 affinity = THREAD_AFFINITY_DEFAULT, RegisterProcess do_register = RegisterProcess::Yes);
- static RefPtr<Process> create_user_process(RefPtr<Thread>& first_thread, const String& path, UserID, GroupID, ProcessID ppid, int& error, Vector<String>&& arguments = Vector<String>(), Vector<String>&& environment = Vector<String>(), TTY* = nullptr);
+ static KResultOr<NonnullRefPtr<Process>> try_create_user_process(RefPtr<Thread>& first_thread, String const& path, UserID, GroupID, Vector<String> arguments, Vector<String> environment, TTY*);
static void register_new(Process&);
bool unref() const;