Repository navigation
Description
Summary
libvt.aio.open_pty() acquires a controlling pseudo-terminal in an isolated child trampoline via fcntl.ioctl(0, termios.TIOCSCTTY, 0) so /dev/tty, os.tcgetpgrp(0), SIGWINCH on resize, and SIGINT on 0x03 work without subprocess preexec_fn (#2). Automated CI in .github/workflows/tests.yml at 7a72ae8 runs exclusively on ubuntu-latest, leaving Darwin (macos-latest) pty.openpty() and BSD TIOCSCTTY semantics unverified in CI.
Motivation
Linux and Darwin/BSD kernels differ on pseudo-terminal session leadership, TIOCSCTTY ioctl argument handling, and master-side EOF (EIO vs 0-byte read) when the slave descriptor closes. At the same time, GitHub Actions macos-latest runners have higher queue latency, stricter concurrency limits, and slower process-spawn timing that make running PTY signal tests on every pull-request matrix leg costly. Verification on macOS is therefore deferred out of the regular Linux PR gate and tracked separately for future opt-in or scheduled coverage.
Proposal
Invariants
The invariants below are load-bearing; everything under Intent is open.
- Standard pull-request CI remains fast and Linux-only (
ubuntu-latest) rather than gating routine commits onmacos-latestrunner availability. open_pty()continues to acquire a controlling terminal (TIOCSCTTY), deliverSIGWINCHandSIGINT, resetSIGPIPEtoSIG_DFL, and propagateexecvpOSErrorfailures withoutpreexec_fn.
Intent (non-binding)
- Add a manual (
workflow_dispatch), release-only, or scheduledmacos-latestworkflow job exercisingtests/test_aio_and_pytest.py(/dev/tty,os.tcgetpgrp(0),PtySession.resize()SIGWINCH,0x03SIGINT, and slave-closeEOFhandling) when macOS CI capacity is worth spending. - Confirm whether Darwin's
pty.openpty()+fcntl.ioctl(0, termios.TIOCSCTTY, 0)requires any BSD-specificOSErrorhandling on slave teardown inPtySession._on_readable.
Not doing
- Adding
macos-latestto the per-push Python3.12–3.15pull-request test matrix in.github/workflows/tests.yml. - Adding Windows ConPTY dependencies (
pywinpty), which would breaklibvt's zero-dependencypy3-none-any.whlcontract.
Activity
tony commentedon Nov 23, 2026
Scope refinement for
0.1.0Pre-
0.1.0verification adds a single-Pythonmacos-latestPTY job alongside awindows-latestportable-core job in.github/workflows/tests.ymlso DarwinTIOCSCTTY,1,024-byteTTYHOGwrite queueing (#24), and drain-until-EIObehavior on fast-exiting children are exercised directly in CI before tagging0.1.0a0.ci(feat[tests]): Add macOS and Windows jobs (#3)