diff --git a/doc/api/readline.md b/doc/api/readline.md index 4a8d8f20ac03c6..300e35868d7d38 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -628,6 +628,12 @@ the best compatibility if it defines an `output.columns` property and emits a `'resize'` event on the `output` if or when the columns ever change ([`process.stdout`][] does this automatically when it is a TTY). +In order to end the wait for the `stdin` input stream (so that the program does not appear to have hanged), `unref` function can be used: + +```js +process.stdin.unref(); +``` + ### Use of the `completer` function The `completer` function takes the current line entered by the user