fix(libkernel): accept signal() for every valid signal number #3394
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3394"
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 LeandroLP23 on 2026-10-11T09:40:56Z.
Carrying @husseinkad's fix for #3076 (they can't open PRs yet). The change is theirs:
57f581c9and41be8fc9cherry-picked ontomain, authorship kept. Two conflicts, both resolved without changing their code:GuestSignals.cppkeepsmain's newalarmchecks next to theirs, and the twoTechnicalDebt.mdlines they reword are applied tomain's current versions (mainhad merged the socket line into "read, write and vector I/O"), so no old line comes back.What
signal()failed withEINVALfor every signal without a host equivalent (SIGPIPE,SIGHUP,SIGUSR1, ...), sosignal(SIGPIPE, SIG_IGN)failed. It now accepts every number from 1 to 128 and records the disposition assigactiondoes, withSIGKILLandSIGSTOPaccepting only the default handler, as in FreeBSD'skern_sigaction. Only the six signals with host equivalents take effect on the host, as before; TechnicalDebt says so.Tested
Windows 11 (26300), WinLibs GCC 15.2.0 r7, Release:
guest_signalspasses 3/3 and fails withmain'sSignals.cpp;ctest -E agc_445/445; conventions pass. Merged ontomaine608d402(after #1431), the 9 signal tests (guest_signal*, raise, kill, sigaction) pass 3/3.Fork CI (run): Windows and the three relinker jobs pass. Linux fails
agc_driver_image_plane_address_on_line_implicit_lodandguest_kernel_stack_protect, the same two in all three runs of this batch (#3111, #3076 and #3097 fixes, unrelated changes), so they come frommain. This run also had oneagc_driver_depth_fast_clear_submitsegfault on lavapipe, which the other two runs don't show.Fixes #3076
Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed in TechnicalDebt.mdfiles or images added to the repository (attach them to this PR)Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-11T09:56:49Z.
Checked on Linux merged onto current main:
guest_signalspasses and fails without the change; the 106 tests of libs and libkernel pass.signal()now matchessigaction()(1..128,SIGKILL/SIGSTOPonly with the default handler) and TechnicalDebt reflects it; merging.