mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
Kernel: Make all syscall functions return KResultOr<T>
This makes it a lot easier to return errors since we no longer have to worry about negating EFOO errors and can just return them flat.
This commit is contained in:
parent
9af1e1a3bf
commit
ac71775de5
70 changed files with 747 additions and 742 deletions
|
@ -28,14 +28,14 @@
|
|||
|
||||
namespace Kernel {
|
||||
|
||||
int Process::sys$disown(ProcessID pid)
|
||||
KResultOr<int> Process::sys$disown(ProcessID pid)
|
||||
{
|
||||
REQUIRE_PROMISE(proc);
|
||||
auto process = Process::from_pid(pid);
|
||||
if (!process)
|
||||
return -ESRCH;
|
||||
return ESRCH;
|
||||
if (process->ppid() != this->pid())
|
||||
return -ECHILD;
|
||||
return ECHILD;
|
||||
process->m_ppid = 0;
|
||||
process->disowned_by_waiter(*this);
|
||||
return 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue