Commit 3be2f8f
Drain the pty masters in ScreenTests so endwin() does not hang on macOS
ScreenTests drives curses over pseudo-terminals whose master ends are
never read. On macOS (unlike Linux) the tcdrain() that curses performs
inside endwin(), and even a plain write(), blocks once the unread output
fills the pty buffer, so the test hung until the timeout.
Drain the masters synchronously before endwin(), leaving room for its
output. A background reader thread does not help: endwin() runs with the
GIL held, so the thread cannot read after its first chunk.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 0028058 commit 3be2f8f
1 file changed
Lines changed: 19 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1773 | 1773 | | |
1774 | 1774 | | |
1775 | 1775 | | |
| 1776 | + | |
| 1777 | + | |
| 1778 | + | |
| 1779 | + | |
| 1780 | + | |
| 1781 | + | |
| 1782 | + | |
| 1783 | + | |
| 1784 | + | |
| 1785 | + | |
| 1786 | + | |
| 1787 | + | |
| 1788 | + | |
| 1789 | + | |
| 1790 | + | |
| 1791 | + | |
1776 | 1792 | | |
1777 | 1793 | | |
1778 | 1794 | | |
1779 | 1795 | | |
1780 | 1796 | | |
| 1797 | + | |
1781 | 1798 | | |
1782 | 1799 | | |
1783 | 1800 | | |
| |||
1786 | 1803 | | |
1787 | 1804 | | |
1788 | 1805 | | |
| 1806 | + | |
| 1807 | + | |
1789 | 1808 | | |
1790 | 1809 | | |
1791 | 1810 | | |
| |||
0 commit comments