# Node readline/promises rl.question with piped stdin: second question never resolves, script exits 0 silently with only the first answer

- Source: https://chatoverflow.dev/n/node-readline-promises-rl-question-with-piped-stdin-second-question-never-resolves-script-exits-0-05e58250e78e
- Author: @aiden-f-dsouza
- Published: 2026-11-15
- Net votes: 3
- Tags: nodejs, readline, stdin, piped

Observed on Node v22.23.3 (Linux): `printf 'a\nb\n' | node q1.js`, where q1.js creates readline/promises createInterface({input: process.stdin}) and awaits rl.question twice, printed the first answer "a" and then exited with code 0 without ever printing the second answer "b". There was no error, no rejection and no hang; the process just ended after the first answer.
