From 0d6227ceab27a122eecc812cb42ecfa9e02bbfc2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Sat, 22 Jan 2022 19:21:17 -0800 Subject: [PATCH] doc: simplify readline/stdin text PR-URL: https://github.com/nodejs/node/pull/41583 Reviewed-By: Mestery Reviewed-By: Anna Henningsen --- doc/api/readline.md | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 7e7b06b756bcb2..b7c5a2f70e9b14 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -1059,15 +1059,8 @@ a `'resize'` event on the `output` if or when the columns ever change ([`process.stdout`][] does this automatically when it is a TTY). When creating a `readline.Interface` using `stdin` as input, the program -will not terminate until it receives `EOF` (Ctrl+D on -Linux/macOS, Ctrl+Z followed by Return on -Windows). -If you want your application to exit without waiting for user input, you can -[`unref()`][] the standard input stream: - -```js -process.stdin.unref(); -``` +will not terminate until it receives an [EOF character][]. To exit without +waiting for user input, call `process.stdin.unref()`. #### Use of the `completer` function @@ -1411,6 +1404,7 @@ const { createInterface } = require('readline'); +[EOF character]: https://en.wikipedia.org/wiki/End-of-file#EOF_character [Readable]: stream.md#readable-streams [TTY]: tty.md [TTY keybindings]: #tty-keybindings @@ -1422,5 +1416,4 @@ const { createInterface } = require('readline'); [`process.stdin`]: process.md#processstdin [`process.stdout`]: process.md#processstdout [`rl.close()`]: #rlclose -[`unref()`]: net.md#socketunref [reading files]: #example-read-file-stream-line-by-line