feat(libkernel): implement getsid for calling process #4578
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/4578"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from boykopovar/AnyPS5. Originally posted by jagrat04 on 2026-10-12T16:06:45Z.
What
Implements getsid (NID gokWod7GAH4) in libkernel. In FreeBSD, getsid returns the session ID of the process (or calling process if pid is 0) and ESRCH (3) for unknown processes. Since AnyPS5 models a single guest process leading its own session, getsid returns the calling process ID for pid 0 or the caller's pid, and fails with ESRCH for any other process ID. Adds unit tests in GuestParentProcess.cpp and updates TechnicalDebt.
Tested
Guest unit tests in core/libs/tests/GuestParentProcess.cpp
Checklist
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T16:08:12Z.
Progress report (
e0fad55→935e7d6)📈 System libraries: 87.6% (+0.03%, +1 implemented functions)
✅ 1 implemented
getsid_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:10:26Z.
Checked getsid against FreeBSD's
sys_getsid(own pid for 0/self, ESRCH otherwise) and the new cases inGuestParentProcess.Added on top of your commit:
guest_ioctl_getsid(core/libs/tests/GuestIoctlGetsid.cppand its registration inlibkernel/CMakeLists.txt): it asserted the old "process sessions not implemented" throw and fails with this change;GuestParentProcesscovers getsid now.Full scoped ctest is green (593 tests); merging once CI is green.
Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T21:13:38Z.
Rebased on current main again: the
getsidline indocs/dev/debt/libkernel.mdconflicted with thesigtimedwait/pause/sigactionentries that landed meanwhile. Only thegetsidline is replaced; the neighbouring entries are untouched.Scoped ctest is green (140 tests, including
guest_parent_process); merging once CI is green.