From 3b995c6d01239cf2099b764917082284fea30c31 Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Sat, 4 Sep 2021 22:36:06 +0200 Subject: 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. --- Kernel/Process.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Kernel/Process.h') 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 create_kernel_process(RefPtr& first_thread, String&& name, void (*entry)(void*), void* entry_data = nullptr, u32 affinity = THREAD_AFFINITY_DEFAULT, RegisterProcess do_register = RegisterProcess::Yes); - static RefPtr create_user_process(RefPtr& first_thread, const String& path, UserID, GroupID, ProcessID ppid, int& error, Vector&& arguments = Vector(), Vector&& environment = Vector(), TTY* = nullptr); + static KResultOr> try_create_user_process(RefPtr& first_thread, String const& path, UserID, GroupID, Vector arguments, Vector environment, TTY*); static void register_new(Process&); bool unref() const; -- cgit v1.2.3