Skip to content

Commit 1b63fa1

Browse files
Fishrock123addaleax
authored andcommitted
tty: remove NODE_TTY_UNSAFE_ASYNC
Nothing but trouble can ever come from it. PR-URL: #12057 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 7e0c3ab commit 1b63fa1

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

doc/api/cli.md

-10
Original file line numberDiff line numberDiff line change
@@ -393,16 +393,6 @@ Path to the file used to store the persistent REPL history. The default path is
393393
to an empty string (`""` or `" "`) disables persistent REPL history.
394394

395395

396-
### `NODE_TTY_UNSAFE_ASYNC=1`
397-
<!-- YAML
398-
added: v6.4.0
399-
-->
400-
401-
When set to `1`, writes to `stdout` and `stderr` will be non-blocking and
402-
asynchronous when outputting to a TTY on platforms which support async stdio.
403-
Setting this will void any guarantee that stdio will not be interleaved or
404-
dropped at program exit. **Use of this mode is not recommended.**
405-
406396
### `NODE_EXTRA_CA_CERTS=file`
407397
<!-- YAML
408398
added: v7.3.0

doc/node.1

-7
Original file line numberDiff line numberDiff line change
@@ -260,13 +260,6 @@ Path to the file used to store the persistent REPL history. The default path
260260
is \fB~/.node_repl_history\fR, which is overridden by this variable. Setting the
261261
value to an empty string ("" or " ") disables persistent REPL history.
262262

263-
.TP
264-
.BR NODE_TTY_UNSAFE_ASYNC =\fI1\fR
265-
When set to \fI1\fR, writes to stdout and stderr will be non-blocking and
266-
asynchronous when outputting to a TTY on platforms which support async stdio.
267-
Setting this will void any guarantee that stdio will not be interleaved or
268-
dropped at program exit. \fBAvoid use.\fR
269-
270263
.TP
271264
.BR OPENSSL_CONF = \fIfile\fR
272265
Load an OpenSSL configuration file on startup. Among other uses, this can be

lib/tty.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ function WriteStream(fd) {
7474
// this behaviour has become expected due historical functionality on OS X,
7575
// even though it was originally intended to change in v1.0.2 (Libuv 1.2.1).
7676
// Ref: https://github.com/nodejs/node/pull/1771#issuecomment-119351671
77-
this._handle.setBlocking(process.env.NODE_TTY_UNSAFE_ASYNC !== '1');
77+
this._handle.setBlocking(true);
7878

7979
var winSize = new Array(2);
8080
var err = this._handle.getWindowSize(winSize);

0 commit comments

Comments
 (0)