fix(libkernel): handle FIOCLEX and FIONCLEX in ioctl #5186
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/5186"
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 p3n1cillin on 2026-10-13T14:09:59Z.
What
Carries @milescoviello's
fix(libkernel): handle FIOCLEX and FIONCLEX in ioctlfrom #4505 (935213047, author kept). @oneandonlydean closed #4505 because no title had been shown to send these requests, and asked for it to come back "with the title ID and that line". Here they are.PS5MC (PPSA99420, Kodi 22, catalog release), once #5183, #5184 and #5185 let it load and start Python:
0x20006601isFIOCLEX. CPython marks the descriptors it opens non-inheritable throughioctl(fd, FIOCLEX)where that request exists, as on FreeBSD. The commit handlesFIOCLEXandFIONCLEXon file descriptors the way FreeBSD'skern_ioctldoes: it sets or clears the descriptor's close-on-exec flag, the same statefcntl(F_SETFD)already keeps. It forwards them for sockets as before. The debt entry forioctlis updated (rebased onto the per-library debt files; the change is the same sentence as in #4505).Tested
main3faa9cb40with #4379, #4374, #4383, #5183, #5184 and #5185, without the host'sHOME. Before, it aborts as above. After, Kodi finds its add-ons (kodi.binary.global.gui,skin.estuary,xbmc.pythonand others), logsCApplication::CreateGUI - using the ps5 windowing system, and runs for the whole 90 s run.guest_kernel_fcntl(from the commit) and all 125 libkernel tests pass on Windows. Earlier reviews of #4505 covered Linux and Windows builds of the same change.python tools/check_conventions.py --base origin/mainpasses.Checklist
main; no other open PR implements the same functionsNotImplemented_nid_no_patch); silent stubs are listed under Silent stubs in their library's technical debt file.mdfiles or images added to the repository (attach them to this PR)🤖 Generated with Claude Code
Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-13T14:19:59Z.
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.
main)docs/dev/debt/libkernel.mdL167-168docs/dev/debt/libkernel.mdL168Imported from boykopovar/AnyPS5. Originally posted by p3n1cillin on 2026-10-13T14:34:49Z.
Linux run: Ubuntu in WSL2, GCC 15.2.0, Ninja Release,
BUILD_TESTING=ON, full build of a local test head838d4fd85. That head ismain3faa9cb40with this PR, my other open libkernel PRs (#5013, #5061, #5078, #5098, #5183–#5187, #5191) and the open PRs the catalog titles need (#4377, #4379, #4374, #4383, #3798, #4467, #4863, #4105). All 123 libkernel and 69 libc tests pass, includingguest_system_configuration,guest_getrlimit,guest_kernel_fcntl,guest_freebsd_clocks,guest_kernel_sysandguest_filesystem. Not built alone on Linux; no title run on Linux.Imported from boykopovar/AnyPS5. Originally posted by babyhuey on 2026-10-13T23:35:57Z.
Linux check of the PS5MC chain (Ubuntu 24.04, GCC 13, Release, headless), on
main7a0c838cwith #5184, #5185 and this PR merged locally. #5185 conflicted with #5184 only indocs/dev/debt/libkernel.md, and I kept both entries._PyImport_InitExternal(RuntimeError).ioctl: request 0x20006601 on a file is not implemented, fd=5.xbmc.pythonand the two TMDb scrapers, and the run reaches the headlessDisplayWindowthrow, as far as a run without a display gets.Imported from boykopovar/AnyPS5. Originally posted by milescoviello on 2026-10-14T02:09:05Z.
Linux run on current
main, now that #5184 and #5185 are merged. Ubuntu 24.04, GCC 13.3, Release, RTX 4070 Ti, PS5MC (PPSA99420) catalog build relinked with--to-intel, 40 s each.main016db923a: stops 0 s in,ioctl: request 0x20006601 on a file is not implemented, fd=7.main016db923awith this PR (clean merge): no ioctl error. Kodi initializes its Python engine, loads its skin and is still running at 40 s, when the runner ends it (Exiting the application...on the stop signal).So on
mainthis PR is the only change PS5MC still needs to start.AI-assisted: yes