diff options
Diffstat (limited to 'Kernel/Syscalls/setpgid.cpp')
-rw-r--r-- | Kernel/Syscalls/setpgid.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Kernel/Syscalls/setpgid.cpp b/Kernel/Syscalls/setpgid.cpp index f10fec2ebf..219297be9b 100644 --- a/Kernel/Syscalls/setpgid.cpp +++ b/Kernel/Syscalls/setpgid.cpp @@ -55,9 +55,10 @@ KResultOr<pid_t> Process::sys$setsid() if (found_process_with_same_pgid_as_my_pid) return EPERM; // Create a new Session and a new ProcessGroup. - MutableProtectedData(*this)->sid = pid().value(); m_pg = ProcessGroup::create(ProcessGroupID(pid().value())); m_tty = nullptr; + ProtectedDataMutationScope scope { *this }; + m_sid = pid().value(); return sid().value(); } |