Skip to content

Commit 5921b8f

Browse files
committed
doc: add unref for input in readline
1 parent 31fe3b2 commit 5921b8f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/api/readline.md

+6
Original file line numberDiff line numberDiff line change
@@ -628,6 +628,12 @@ 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 does not appear to have hanged), `unref` function can be used:
632+
633+
```js
634+
process.stdin.unref();
635+
```
636+
631637
### Use of the `completer` function
632638

633639
The `completer` function takes the current line entered by the user

0 commit comments

Comments
 (0)