How often does it reproduce? Is there a required condition?
Always.
What is the expected behavior? Why is that the expected behavior?
I'd expect the same behavior as when processB is started using spawn (as opposed to spawnSync), except that the execution blocks until process B has exited. I came across this as I wanted to pipe output of one command into the input of another - the equivalent of the following using a shell pipe:
Version
v22.0.0
Platform
Darwin M-K9RR7TRQKL 23.4.0 Darwin Kernel Version 23.4.0: Fri Mar 15 00:12:37 PDT 2024; root:xnu-10063.101.17~1/RELEASE_ARM64_T6031 arm64
Subsystem
child_process
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'd expect the same behavior as when
processB
is started usingspawn
(as opposed tospawnSync
), except that the execution blocks until process B has exited. I came across this as I wanted to pipe output of one command into the input of another - the equivalent of the following using a shell pipe:What do you see instead?
Additional information
This doesn't seem like a "new" regression: I've reproduced this on v20.12.0 as well.
These issues seemed related: