libkernel: implement sigpending and sigsuspend (#1578); branch and PR #3252 ready #3253

Closed
opened 2026-10-11 03:32:10 +00:00 by pushkarreddyy · 3 comments
pushkarreddyy commented 2026-10-11 03:32:10 +00:00 (Migrated from github.com)
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T03:32:10Z.


Problem & Context

Titles cataloged in #1578 and POSIX homebrew ports require signal set inspection and suspension exports: sigpending (hpoDTzy9Yy0) and sigsuspend (KZ-4qlqlpmo). While _sigprocmask, sigaction, and sigaltstack are present, sigpending and sigsuspend remain missing in libkernel.

Ready Fix & Branch

A clean, self-contained fix conforming 100% to repository conventions (0 comments, atomic commit, unit tests in GuestSignals, TechnicalDebt entry) is implemented and ready:

Implementation Details

  • sigpending_nid_postfix: Checks pointer for null (EFAULT 14); clears returned signal set (as no asynchronous pending signals queue is maintained); preserves guest errno.
  • sigsuspend_nid_postfix: Checks mask pointer for null (EFAULT 14); returns -1 and sets *__error_nid_postfix() = 4 (EINTR).
  • Extended GuestSignals.cpp unit test suite covering null pointer rejection, sentinel errno preservation, and EINTR return.
  • Updated docs/dev/TechnicalDebt.md.
  • Passed python tools/check_conventions.py --base origin/main with 0 errors.

Opening this tracking issue while PR #3252 is intake-paused so maintainers can review, carry, or cherry-pick into an active merge train.

<!-- greyfinch-sync:boykopovar/AnyPS5:issue:5797624256 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3253). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T03:32:10Z. --- ### Problem & Context Titles cataloged in #1578 and POSIX homebrew ports require signal set inspection and suspension exports: `sigpending` (`hpoDTzy9Yy0`) and `sigsuspend` (`KZ-4qlqlpmo`). While `_sigprocmask`, `sigaction`, and `sigaltstack` are present, `sigpending` and `sigsuspend` remain missing in `libkernel`. ### Ready Fix & Branch A clean, self-contained fix conforming 100% to repository conventions (0 comments, atomic commit, unit tests in `GuestSignals`, TechnicalDebt entry) is implemented and ready: - Branch: [`pushkarreddyy:feat/libkernel-sigpending-sigsuspend`](https://github.com/pushkarreddyy/AnyPS5/tree/feat/libkernel-sigpending-sigsuspend) - Commit: `0b35d7427` - PR: #3252 ### Implementation Details - `sigpending_nid_postfix`: Checks pointer for null (`EFAULT` 14); clears returned signal set (as no asynchronous pending signals queue is maintained); preserves guest errno. - `sigsuspend_nid_postfix`: Checks mask pointer for null (`EFAULT` 14); returns -1 and sets `*__error_nid_postfix() = 4` (`EINTR`). - Extended `GuestSignals.cpp` unit test suite covering null pointer rejection, sentinel errno preservation, and EINTR return. - Updated `docs/dev/TechnicalDebt.md`. - Passed `python tools/check_conventions.py --base origin/main` with 0 errors. Opening this tracking issue while PR #3252 is intake-paused so maintainers can review, carry, or cherry-pick into an active merge train.
pushkarreddyy commented 2026-10-11 03:43:48 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-11T03:43:48Z.


cc @MarcZX100 @adriadam10: Branch pushkarreddyy:feat/libkernel-sigpending-sigsuspend (0b35d7427) on PR #3252 is verified and ready for review/carry.

  • Completes the POSIX signal set family in libkernel (sigpending and sigsuspend with FreeBSD error semantics and null checks).
  • Passed check_conventions.py with 0 errors, GuestSignals tests passing, and positive bot progress report (+2 implemented).
<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6105128252 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3253#issuecomment-6105128252). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-11T03:43:48Z. --- cc @MarcZX100 @adriadam10: Branch [`pushkarreddyy:feat/libkernel-sigpending-sigsuspend`](https://github.com/pushkarreddyy/AnyPS5/tree/feat/libkernel-sigpending-sigsuspend) (`0b35d7427`) on PR #3252 is verified and ready for review/carry. - Completes the POSIX signal set family in libkernel (`sigpending` and `sigsuspend` with FreeBSD error semantics and null checks). - Passed `check_conventions.py` with 0 errors, `GuestSignals` tests passing, and positive bot progress report (`+2 implemented`).
oneandonlydean commented 2026-10-14 00:09:31 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-14T00:09:31Z.


Closing: sigpending is on main from #4383. sigsuspend was left out there because no title reaches it; if one does, comment here with the title ID and the log line.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6157880183 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3253#issuecomment-6157880183). Originally posted by [oneandonlydean](https://github.com/oneandonlydean) on 2026-10-14T00:09:31Z. --- Closing: `sigpending` is on main from #4383. `sigsuspend` was left out there because no title reaches it; if one does, comment here with the title ID and the log line.
pushkarreddyy commented 2026-10-14 02:43:03 +00:00 (Migrated from github.com)
Author
Contributor

Imported from boykopovar/AnyPS5. Originally posted by pushkarreddyy on 2026-10-14T02:43:03Z.


@oneandonlydean Understood, thanks for merging sigpending in #4383! Will hold sigsuspend until runtime title log evidence emerges.

<!-- greyfinch-sync:boykopovar/AnyPS5:comment:6159704389 --> Imported from [boykopovar/AnyPS5](https://github.com/boykopovar/AnyPS5/issues/3253#issuecomment-6159704389). Originally posted by [pushkarreddyy](https://github.com/pushkarreddyy) on 2026-10-14T02:43:03Z. --- @oneandonlydean Understood, thanks for merging `sigpending` in #4383! Will hold `sigsuspend` until runtime title log evidence emerges.
Sign in to join this conversation.
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
boykopovar/AnyPS5#3253
No description provided.