Version
v20.1.0
Platform
Linux 6.2.6-76060206-generic #202303130630168132977822.04~d824cd4 SMP PREEMPT_DYNAMIC Wed A x86_64 x86_64 x86_64 GNU/Linux
Subsystem
tty
What steps will reproduce the bug?
const child_process = require("child_process");
const main = process.argv[2] == null;
if (main) {
process.stdin.setRawMode(true);
console.log("parent:", process.stdin.isRaw);
child_process.spawn("node", [__filename, "child"], { stdio: "inherit" });
} else {
console.log("child:", process.stdin.isRaw);
}
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
I expect both logs to print true:
What do you see instead?
The child process log prints false:
parent: true
child: false
Additional information
It seems that isRaw is unconditionally initialized to false (here), regardless of the actual state of the underlying tty.
I don't see anything obvious in libuv that would help initializing this flag, so maybe it's blocked on upstream?
Version
v20.1.0
Platform
Linux 6.2.6-76060206-generic #202303130630
168132977822.04~d824cd4 SMP PREEMPT_DYNAMIC Wed A x86_64 x86_64 x86_64 GNU/LinuxSubsystem
tty
What steps will reproduce the bug?
How often does it reproduce? Is there a required condition?
Always
What is the expected behavior? Why is that the expected behavior?
I expect both logs to print
true:What do you see instead?
The child process log prints
false:Additional information
It seems that
isRawis unconditionally initialized tofalse(here), regardless of the actual state of the underlying tty.I don't see anything obvious in libuv that would help initializing this flag, so maybe it's blocked on upstream?