-
-
Notifications
You must be signed in to change notification settings - Fork 34.2k
Closed
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.ttyIssues and PRs related to the tty subsystem.Issues and PRs related to the tty subsystem.
Description
- Version: v14.15.1
- Platform: Linux 5.8.0-38-generic The binary and long term compatibility with node #43~20.04.1-Ubuntu SMP Tue Jan 12 16:39:47 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
- Subsystem: process
What steps will reproduce the bug?
Setup a node instance,
» node
and run the following javascript code.
new tty.ReadStream(4);
child_process.spawnSync('str');
Then the node instance occurs an abort.
In my practice, the only value "4" results in the abort.
How often does it reproduce? Is there a required condition?
This abort can always be triggered following the steps above.
What is the expected behavior?
I noticed that nodejs docs say "In normal circumstances process.stdin will be the only tty.ReadStream instance in a Node.js process and there should be no reason to create additional instances.". Maybe some limitation for users to construct a tty.ReadStream is needed. If any error occurs, an exception or other similar error-reporting stuff should be thrown. There is no reason to abort the whole node process.
What do you see instead?
» node
Welcome to Node.js v14.15.1.
Type ".help" for more information.
> new tty.ReadStream(4);
<ref *1> ReadStream {
...
}
> child_process.spawnSync('str');
[2] 2461977 abort node
Additional information
Metadata
Metadata
Assignees
Labels
child_processIssues and PRs related to the child_process subsystem.Issues and PRs related to the child_process subsystem.confirmed-bugIssues with confirmed bugs.Issues with confirmed bugs.ttyIssues and PRs related to the tty subsystem.Issues and PRs related to the tty subsystem.