()
| 42 | let inputEnded = false |
| 43 | let readlineActive = false |
| 44 | const onStdinEnd = () => { |
| 45 | inputEnded = true |
| 46 | if (!readlineActive) { |
| 47 | Queue.endUnsafe(lines) |
| 48 | } |
| 49 | } |
| 50 | // Node's stdio getters can set O_NONBLOCK on inherited pipes, so only |
| 51 | // access a stream from an operation that uses it. |
| 52 | let stdin: typeof process.stdin | undefined |