node/test/pseudo-tty
Ben Noordhuis f321921573
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: https://github.com/nodejs/node/issues/16141
Fixes: https://github.com/nodejs/node/issues/16194
PR-URL: https://github.com/nodejs/node/pull/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>
2017-12-11 15:52:35 -05:00
..
no_dropped_stdio.js test: change isAix to isAIX 2017-07-16 02:24:47 -07:00
no_dropped_stdio.out
no_interleaved_stdio.js test: change isAix to isAIX 2017-07-16 02:24:47 -07:00
no_interleaved_stdio.out
pseudo-tty.status tty: fix 'resize' event regression 2017-12-11 15:52:35 -05:00
ref_keeps_node_running.js test: remove common.noop 2017-07-03 11:39:35 -07:00
ref_keeps_node_running.out tty: add ref() so process.stdin.ref() etc. work 2017-02-28 18:44:05 +01:00
stdin-setrawmode.js test: add test for process.stdin.setRawMode() 2016-12-05 14:23:15 -08:00
stdin-setrawmode.out test: add stdin-setrawmode.out file 2016-12-09 15:20:51 +01:00
test-handle-wrap-isrefed-tty.js test: adjust indentation for stricter linting 2017-07-27 09:24:20 -07:00
test-handle-wrap-isrefed-tty.out tty: add ref() so process.stdin.ref() etc. work 2017-02-28 18:44:05 +01:00
test-stderr-stdout-handle-sigwinch.js test: change isAix to isAIX 2017-07-16 02:24:47 -07:00
test-stderr-stdout-handle-sigwinch.out test: add test for SIGWINCH handling by stdio.js 2016-12-27 21:21:35 -08:00
test-tty-isatty.js tty,doc: add type-check to isatty 2017-10-22 16:51:10 -07:00
test-tty-isatty.out tty,doc: add type-check to isatty 2017-10-22 16:51:10 -07:00
test-tty-stdout-end.js stream: add destroy and _destroy methods. 2017-05-22 08:34:14 +02:00
test-tty-stdout-end.out
test-tty-stdout-resize.js tty: fix 'resize' event regression 2017-12-11 15:52:35 -05:00
test-tty-stdout-resize.out tty: fix 'resize' event regression 2017-12-11 15:52:35 -05:00
test-tty-stream-constructors.js test: add coverage to tty module 2017-12-11 15:52:34 -05:00
test-tty-stream-constructors.out test: add coverage to tty module 2017-12-11 15:52:34 -05:00
test-tty-window-size.js test: add coverage to tty module 2017-12-11 15:52:34 -05:00
test-tty-window-size.out test: add coverage to tty module 2017-12-11 15:52:34 -05:00
test-tty-wrap.js
test-tty-wrap.out
testcfg.py test: fail for missing output files 2016-12-12 16:11:12 +01:00