feat(libkernel): implement kill #2543
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2543"
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 overlordxrz-source on 2026-10-10T03:26:17Z.
What
kill(W0xkN0+ZkCE, libkernel) is missing onmain. ProsperoStore (PPSA99000, the homebrew store) stops at it on currentmain.The call is in the store's crash reporter (crash_report.cpp). It puts the crash signal back to
SIG_DFLand sends it again withkill(getpid(), signal). The import has to resolve before the title can start. The call itself only runs from anSA_SIGINFOcrash handler, andmaindoes not deliver those yet.killfollows FreeBSD'skern_killandkillpg1(kern_sig.c). The guest is the only guest process:EINVAL. This is checked first, askern_killdoes.0(its process group) and minus its own pid go to the caller through the existingraise. So they runsignal/sigactionhandlers, honourSIG_IGNand thesigprocmaskmask, and have the same limits asraise.-1returnsESRCH, because FreeBSD's broadcast skips the caller and there is no other process. Any other pid also returnsESRCH.EPERMis never returned, since there is no other process that could refuse permission. The guest is also assumed to lead its own process group. Both points are in TechnicalDebt next tosigaction.Log
Linux rig (x86-64 Ubuntu, lavapipe, Release), homebrew catalog run of 2026-10-09: ProsperoStore PPSA99000 stops at the unresolved libkernel import
W0xkN0+ZkCE(kill).W0xkN0+ZkCEis the NID ofkill(SHA-1 NID computed withtools/nid_names.py, and it matches zecoxao'saerolib.csv). Nothing else onmainor in an open PR exports it. The closed #2383 only declared it asNotImplemented.With this PR applied, PPSA99000 moves past kill, next stop =
./app.elf: symbol lookup error: ./app.elf: undefined symbol: Mv1zUObHvXI.Tested
aarch64 Debian host. The full project can't be built here because it needs x86-64.
core/libs/tests/GuestKill.cpp(guest_kill, registered for Linux and Windows likeguest_signals):ESRCHfor signal 0 and forSIGTERM, and nothing is delivered;EINVAL, even for a pid that does not exist;SIGTERMreaches asignalhandler through each of the three self targets;SIG_IGNis honoured;raise'sEINVAL.Signals.cpp(Zig 0.17 clang) and it passes. The existingGuestSignals.cppstill passes against the changed file too. Four mutants each fail the test: wrong errno for a missing pid, signal 0 delivering, pid 0 not treated as self, and negative signals accepted.Signals.cppand the test compile for x86_64-linux-gnu and x86_64-windows-gnu with-Wall -Wextra. The only warning is the existing-Wreturn-type-c-linkagefromGeneral.hpp. Both also link into an x86_64 Linux executable and a MinGW.exe. Neither was run here.python3 tools/check_conventions.pypasses.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 github-actions[bot] on 2026-10-10T03:26:28Z.
Thank you for your interest in the project! We are sorry, but we cannot accept more PRs while we work through the existing backlog. This PR has been automatically closed and labeled "intake paused". This is not a judgment of the quality of your changes.
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-10T03:26:45Z.
Progress report (
3d1a7d9→9a70477)➖ System libraries: 85.75% (+0.0%, +1 implemented functions)
✅ 1 implemented
kill_nid_postfixImported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-10T09:09:01Z.
Rebased onto current
main(only conflict: the TechnicalDebt line, moved next tosigactioninstead of the end of the file).killmatches FreeBSD'skern_kill/killpg1for the single guest process;guest_killand the signal tests pass on Linux after the rebase. Merging once CI is green.