Commit 25df3f0
Drain the pty master in ScreenTests so endwin() does not hang on macOS
ScreenTests drives curses over a pseudo-terminal whose master was never
read. On macOS (and other BSD-derived platforms) the tcdrain() that
curses performs inside endwin() blocks until the master side is read, so
the test hung until the timeout; Linux does not block there.
Drain each pty master in a background daemon thread, joined (with a
timeout) once both ends are closed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0028058 commit 25df3f0
1 file changed
Lines changed: 21 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | | - | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
1784 | 1785 | | |
1785 | 1786 | | |
1786 | 1787 | | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
| 1792 | + | |
| 1793 | + | |
| 1794 | + | |
| 1795 | + | |
| 1796 | + | |
1787 | 1797 | | |
1788 | 1798 | | |
| 1799 | + | |
| 1800 | + | |
| 1801 | + | |
| 1802 | + | |
| 1803 | + | |
| 1804 | + | |
| 1805 | + | |
| 1806 | + | |
| 1807 | + | |
| 1808 | + | |
1789 | 1809 | | |
1790 | 1810 | | |
1791 | 1811 | | |
| |||
0 commit comments