Commit 44858ec
committed
Fix flakey interactive test
The PTY drain loop in the Ctrl-C test had a race: after sending the keystroke, the parent only drained for 0.5s before calling os.waitpid. If the child was still writing to the PTY after that window closed, it would block on a full PTY buffer, deadlocking waitpid. Moving the drain into a background thread keeps the buffer clear while waitpid runs.1 parent 453468d commit 44858ec
1 file changed
Lines changed: 16 additions & 8 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
838 | 838 | | |
839 | 839 | | |
840 | 840 | | |
841 | | - | |
| 841 | + | |
842 | 842 | | |
843 | 843 | | |
844 | 844 | | |
845 | 845 | | |
846 | 846 | | |
847 | 847 | | |
848 | 848 | | |
| 849 | + | |
| 850 | + | |
| 851 | + | |
| 852 | + | |
| 853 | + | |
| 854 | + | |
| 855 | + | |
| 856 | + | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
849 | 863 | | |
850 | 864 | | |
851 | | - | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
| 865 | + | |
858 | 866 | | |
859 | 867 | | |
860 | 868 | | |
| |||
0 commit comments