mirror of
https://github.com/l0ng-ai/tty7.git
synced 2026-11-06 08:15:35 +00:00
`a_terminal_with_its_other_end_gone_fails_the_write_at_once` failed about one run in three alongside the other hook tests (never on its own): its pty came from `openpty`, whose descriptors are inherited, and the Qoder, CodeBuddy and Crush config tests spawn children on threads of their own. A child that took a copy of the pane's end kept it open after the test closed it, and the write went through. Open both ends close-on-exec from the start, and since a child forked a moment earlier still holds a copy until it gets to exec, retry a write that went through after a short pause; every attempt must still return within the timeout, which is what the test is for. 50 runs of the hook tests in parallel now pass, where 13 of 40 failed before.