Commit f321921
tty: fix 'resize' event regression
It's not wholly clear what commit introduced the regression but between
v8.4.0 and v8.5.0 the 'resize' event stopped getting emitted when the
tty was resized.
The SIGWINCH event listener apparently was being installed before the
support code for `process.on('SIGWINCH', ...)` was. Fix that by moving
said support code to real early in the bootstrap process.
This commit also seems to fix a Windows-only "write EINVAL" error for
reasons even less well-understood...
Fixes: #16141
Fixes: #16194
PR-URL: #16225
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Yuta Hiroto <hello@about-hiroppy.com>1 parent 7ac760b commit f321921Copy full SHA for f321921
File tree
Expand file treeCollapse file tree
4 files changed
+17
-1
lines changedOpen diff view settings
Filter options
- lib/internal
- test/pseudo-tty
Expand file treeCollapse file tree
4 files changed
+17
-1
lines changedOpen diff view settings
Collapse file
lib/internal/bootstrap_node.js
Copy file name to clipboardExpand all lines: lib/internal/bootstrap_node.js+1-1Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
33 | 33 | |
34 | 34 | |
35 | 35 | |
| 36 | + |
36 | 37 | |
37 | 38 | |
38 | 39 | |
| ||
55 | 56 | |
56 | 57 | |
57 | 58 | |
58 | | - |
59 | 59 | |
60 | 60 | |
61 | 61 | |
|
Collapse file
test/pseudo-tty/pseudo-tty.status
Copy file name to clipboardExpand all lines: test/pseudo-tty/pseudo-tty.status+5Lines changed: 5 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
3 | 3 | |
4 | 4 | |
5 | 5 | |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
Collapse file
test/pseudo-tty/test-tty-stdout-resize.js
Copy file name to clipboard+11Lines changed: 11 additions & 0 deletions
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| ||
| 1 | + |
| 2 | + |
| 3 | + |
| 4 | + |
| 5 | + |
| 6 | + |
| 7 | + |
| 8 | + |
| 9 | + |
| 10 | + |
| 11 | + |
Collapse file
test/pseudo-tty/test-tty-stdout-resize.out
Copy file name to clipboardExpand all lines: test/pseudo-tty/test-tty-stdout-resize.outWhitespace-only changes.
0 commit comments