Skip to content

feat(libkernel): implement getsid for calling process - #4170

Closed
jagrat04 wants to merge 1 commit into
boykopovar:mainfrom
jagrat04:feat-libkernel-getsid
Closed

jagrat04 wants to merge 1 commit into
boykopovar:mainfrom
jagrat04:feat-libkernel-getsid

Conversation

@jagrat04

Copy link
Copy Markdown
Contributor

What

Implement getsid in libkernel:

  • When pid is 0 or matches getpid(), return the caller's process ID (as the single guest process acts as its own session leader).
  • For any other PID, return -1 and set errno to ESRCH (3) following standard FreeBSD semantics.
  • Add test coverage in core/libs/tests/GuestParentProcess.cpp.
  • Update docs/dev/TechnicalDebt.md.

Tested

  • python tools/check_conventions.py --base origin/main passed with 0 violations.
  • Verified zero comments in C++ implementation files.

Checklist

  • Based on current main; no other open PR implements the same functions
  • One topic per PR; follow-ups go in a new PR
  • No comments in code except technical debt
  • Unimplemented paths throw (NotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt
  • No notes, investigation .md files or images added to the repository (attach them to this PR)
  • New third-party code is a submodule built from source
  • Generic behaviour, not specific to one title
  • Depends on: none
  • AI-assisted: yes

@github-actions

Copy link
Copy Markdown

Progress report (7a84b22 → 03ec272)

📈 System libraries: 86.5% (+0.03%, +1 implemented functions)

✅ 1 implemented
Library Name
libkernel getsid_nid_postfix

@github-actions

github-actions Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Other open pull requests touch the same code. Merging one will break the other, or both implement the same thing. If this one builds on them, list them in Depends on.

Pull request Conflicting files (lines on main) Same exports Same new files
#4138 docs/dev/TechnicalDebt.md L659-662

@oneandonlydean

Copy link
Copy Markdown
Collaborator

Closing, as with #4168: getsid throws on main because sessions aren't modelled, PPSA74126 imports it without calling it, and returning the pid assumes the process leads its own session. Reopen when a title calls it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants