From 33a1f72ba5d0afc0ed3e53adb8c103ab5a6cda19 Mon Sep 17 00:00:00 2001 From: Anu Pasumarthy Date: Thu, 1 Apr 2021 14:33:58 -0400 Subject: [PATCH] address comment: detail unref usecase --- doc/api/readline.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/doc/api/readline.md b/doc/api/readline.md index 454fefb96e92b3..f9eda125afc060 100644 --- a/doc/api/readline.md +++ b/doc/api/readline.md @@ -628,8 +628,10 @@ 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: +When creating a `readline.Interface` using `stdin` as input stream, the program +will notterminate until it receives `EOF` (Ctrl+D). +If you want your application to exit without waiting for user input, you can +`unref` the standard input: ```js process.stdin.unref();