feat(libkernel): implement the remaining termios calls #3781
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3781"
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 YossiYad on 2026-10-11T16:40:16Z.
What
Carries screamm's
screamm/AnyPS5:feat/libkernel-termios-callscommit from #3723 unchanged onto currentmain, preserving its author, and adds one follow-up test commit:tcsendbreak,tcdrain,tcflush,tcflow,tcgetpgrpandtcsetpgrpnext to the mergedtcgetattr/tcsetattr, after FreeBSD 11.4lib/libc/gen/termios.c.tcflushandtcflowreturnEINVALfor an out-of-range queue or action before the descriptor is used; every other case fails with the errortcgetattrgives (EBADF,ENOTTYfor a file or pipe,EADDRNOTAVAILforAF_INET,EOPNOTSUPPfor other sockets).tcgetpgrp/tcsetpgrpthrow on a host pipe above descriptor 2, because FreeBSD answers there with the SIGIO owner, which is not modelled. PS5MC (PPSA99420) and XPSemu (PPSA97358) import all six, as reported in #3723.guest_terminalwith a Unix-domain socket pair and a directory descriptor. The original test never reached theEOPNOTSUPPbranch or a descriptor that is neither a file nor a pipe: withTerminalErrorreturningEADDRNOTAVAILfor every socket family, orHostPipetreating any non-regular file as a pipe, the original test still passes and the extended one fails.The library progress moves from 2903/3383 (85.81%) to 2909/3389 (85.84%). The total rises by six because none of the six calls was exported before.
Closes #3723.
Tested
Linux (Bazzite 44, GCC 16.2.1, Ninja, Release,
-DBUILD_TESTING=ON), based onmaina11c8f7f:libs, and fullctest: 824 pass, 8 skip, no failures (832 registered tests).guest_terminalpasses 10 consecutive runs. This is the first Linux run of the carried commit; the author reported Windows only.Terminal.cppone at a time and checked against both the original and the extended test.tools/check_conventions.py --base upstream/mainandgit diff --checkpass.Checklist
main; no other open PR implements the same functions.mdfiles or images added to the repositoryImported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-11T16:40:55Z.
Progress report (
3e0e01f→0c1fa50)📈 System libraries: 86.39% (+0.03%, +6 implemented functions)
✅ 6 implemented
tcdrain_nid_postfixtcflow_nid_postfixtcflush_nid_postfixtcgetpgrp_nid_postfixtcsendbreak_nid_postfixtcsetpgrp_nid_postfixImported from boykopovar/AnyPS5. Originally posted by oneandonlydean on 2026-10-11T23:16:47Z.
Conflicts with main in
docs/dev/TechnicalDebt.md; please rebase.Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T19:59:25Z.
Rebased onto current
main: the TechnicalDebt entry now lives indocs/dev/debt/libkernel.md(entries moved there in342a8c459), under "Functional"; no code changes. Checked against FreeBSDtermios.c(tcflush/tcflowEINVALbefore the ioctl,tcsendbreakfailing onTIOCSBRKbefore the pause, pgrp calls via ioctl);guest_terminalpasses locally on Linux and the new cases fail without the implementation. Merging once CI is green.Imported from boykopovar/AnyPS5. Originally posted by github-actions[bot] on 2026-10-12T20:06:45Z.
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.mdL94-95Imported from boykopovar/AnyPS5. Originally posted by adriadam10 on 2026-10-12T20:12:10Z.
Checked against FreeBSD
termios.c(tcflush/tcflowEINVALbefore the ioctl,tcsendbreakfailing onTIOCSBRKbefore the pause, pgrp calls via ioctl);guest_terminalpasses locally on Linux on the rebased head. Merging once CI is green.