Repository navigation
Commit 6b4e208
committed
Do not block when writing nothing to PTY master input queue
A zero-length write(2) to a PTY master blocked forever (or returned
EAGAIN with O_NONBLOCK). inputQueueWrite returned ErrWouldBlock whenever
no bytes were copied, which is indistinguishable from a full input
queue when the source is empty. Linux returns 0, even if the input
queue is full.
This is the master-side counterpart of #9955, which fixed the same
problem for writes to the replica's output queue.
Assisted-by: Claude Code1 parent 3cd7128 commit 6b4e208
2 files changed
Lines changed: 25 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
354 | 354 | | |
355 | 355 | | |
356 | 356 | | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
357 | 362 | | |
358 | 363 | | |
359 | 364 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1746 | 1746 | | |
1747 | 1747 | | |
1748 | 1748 | | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
| 1760 | + | |
| 1761 | + | |
| 1762 | + | |
| 1763 | + | |
| 1764 | + | |
| 1765 | + | |
| 1766 | + | |
| 1767 | + | |
| 1768 | + | |
1749 | 1769 | | |
1750 | 1770 | | |
1751 | 1771 | | |
| |||
0 commit comments