Skip to content

Commit 33a1f72

Browse files
committed
address comment: detail unref usecase
1 parent a5fe4a9 commit 33a1f72

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

doc/api/readline.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -628,8 +628,10 @@ the best compatibility if it defines an `output.columns` property and emits
628628
a `'resize'` event on the `output` if or when the columns ever change
629629
([`process.stdout`][] does this automatically when it is a TTY).
630630

631-
In order to end the wait for the `stdin` input stream (so that the program
632-
does not appear to have hanged), `unref` function can be used:
631+
When creating a `readline.Interface` using `stdin` as input stream, the program
632+
will notterminate until it receives `EOF` (<kbd>Ctrl</kbd>+<kbd>D</kbd>).
633+
If you want your application to exit without waiting for user input, you can
634+
`unref` the standard input:
633635

634636
```js
635637
process.stdin.unref();

0 commit comments

Comments
 (0)