0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/test/pseudo-tty
Denys Otrishko fe47b8b6a5 stream: fix readable behavior for highWaterMark === 0
Avoid trying to emit 'readable' due to the fact that
state.length is always >= state.highWaterMark if highWaterMark is 0.
Therefore upon .read(0) call (through .on('readable')) stream assumed
that it has enough data to emit 'readable' even though
state.length === 0 instead of issuing _read(). Which led to the TTY
not recognizing that someone is waiting for the input.

Fixes: https://github.com/nodejs/node/issues/20503
Refs: https://github.com/nodejs/node/pull/18372

PR-URL: https://github.com/nodejs/node/pull/21690
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
2018-08-10 17:16:59 +02:00
..
console_colors.js
console_colors.out
no_dropped_stdio.js
no_dropped_stdio.out
no_interleaved_stdio.js
no_interleaved_stdio.out
pseudo-tty.status
ref_keeps_node_running.js
ref_keeps_node_running.out
stdin-setrawmode.js
stdin-setrawmode.out
test-assert-colors.js assert: multiple improvements 2018-08-04 10:04:32 +02:00
test-assert-colors.out
test-async-wrap-getasyncid-tty.js
test-async-wrap-getasyncid-tty.out
test-handle-wrap-isrefed-tty.js
test-handle-wrap-isrefed-tty.out
test-readable-tty-keepalive.js stream: fix readable behavior for highWaterMark === 0 2018-08-10 17:16:59 +02:00
test-readable-tty-keepalive.out stream: fix readable behavior for highWaterMark === 0 2018-08-10 17:16:59 +02:00
test-set-raw-mode-reset-process-exit.js test: check TTY mode reset on exit 2018-06-01 10:52:06 +02:00
test-set-raw-mode-reset-process-exit.out test: check TTY mode reset on exit 2018-06-01 10:52:06 +02:00
test-set-raw-mode-reset-signal.js test: check TTY mode reset on exit 2018-06-01 10:52:06 +02:00
test-set-raw-mode-reset-signal.out test: check TTY mode reset on exit 2018-06-01 10:52:06 +02:00
test-set-raw-mode-reset.js test: check TTY mode reset on exit 2018-06-01 10:52:06 +02:00
test-set-raw-mode-reset.out test: check TTY mode reset on exit 2018-06-01 10:52:06 +02:00
test-stderr-stdout-handle-sigwinch.js
test-stderr-stdout-handle-sigwinch.out
test-tty-get-color-depth.js
test-tty-get-color-depth.out
test-tty-isatty.js
test-tty-isatty.out
test-tty-stdin-end.js src: remove kFlagNoShutdown flag 2018-05-04 00:57:38 +02:00
test-tty-stdin-end.out src: remove kFlagNoShutdown flag 2018-05-04 00:57:38 +02:00
test-tty-stdout-end.js
test-tty-stdout-end.out
test-tty-stdout-resize.js
test-tty-stdout-resize.out
test-tty-stream-constructors.js
test-tty-stream-constructors.out
test-tty-window-size.js
test-tty-window-size.out
test-tty-wrap.js
test-tty-wrap.out
testcfg.py tools,test: remove unused config hooks 2018-07-31 10:26:04 -04:00