libkernel: tcsendbreak, tcdrain, tcflush, tcflow, tcgetpgrp and tcsetpgrp are absent (PS5MC, XPSemu); fix branch ready #3723
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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 screamm on 2026-10-11T16:00:00Z.
libkernel lacks
tcsendbreak(vXE-dIUIZlE),tcdrain(brGGJWsZauw),tcflush(FxHW5NuEXsY),tcflow(OG8xRaGIpqk),tcgetpgrp(5OEl1mRhUm0) andtcsetpgrp(YMuesZTyTl4). From the relink registry order they are the next predicted stops of PS5MC (PPSA99420, indices 442 onward and 462/463) and XPSemu (PPSA97358, index 214, its first uncovered import); not yet observed in a run.Fix branch ready:
screamm:feat/libkernel-termios-calls(d4625e23, one commit onmaina11c8f7f). I cannot open it as a PR because of the intake check; anyone eligible is welcome to carry it, keeping the commit as is.tcgetattrprecedent inTerminal.cpp:EBADFfor a closed descriptor,ENOTTYfor a file or pipe, the socket errorstcgetattralready gives (EADDRNOTAVAILforAF_INET,EOPNOTSUPPotherwise), per FreeBSD 11.4lib/libc/gen/termios.cover the per-descriptor ioctl handlers (sys_generic.c,sys_socket.c,vfs_vnops.c,sys_pipe.c,in.c/in6.c,8c639945).tcflushreturnsEINVALfor a queue outside 1..3 andtcflowfor an action outside 1..4 before the descriptor check, as the libc source orders it;tcsendbreak's 0.4 s pause is never reached because its first ioctl fails.TIOCGPGRP/TIOCSPGRPwith the pipe's signal owner, which is not modelled, sotcgetpgrp/tcsetpgrpthrow on a guest pipe above descriptor 2 instead of returningENOTTY(descriptors 0 to 2 keep thetcgetattrtreatment). Recorded in TechnicalDebt.guest_terminalcovers each call over stdin/stdout/stderr, a file, both pipe ends and anAF_INETsocket, theEINVALcases (on a file and on -1) andEBADFfor -1 and closed descriptors of each kind.Tested on Windows 11 Pro 26220, WinLibs MinGW-w64 GCC 15.2.0 r7, Ninja, Release,
BUILD_TESTING=ON, full build includinglibs:guest_terminal3/3;ctest -j8 -E "^agc_driver_|^video_out_flip"532/536, the failures being the knownwindows_exceptions(#3411, fixed by #3415),guest_kernel_sys(#3510),guest_filesystem(#3518) and theagc_driverflake (#3171); withmain'sTerminal.cppthe extended test fails;tools/check_conventions.py --base mainandgit diff --checkpass. Not run on Linux.Written with Claude Code assistance (implementation by a subagent, reviewed and validated in this session).