'inherit' rather than 'pipe' stdio streams#36
Open
lorenzogrv wants to merge 2 commits intoDTrejo:masterfrom
Open
'inherit' rather than 'pipe' stdio streams#36lorenzogrv wants to merge 2 commits intoDTrejo:masterfrom
lorenzogrv wants to merge 2 commits intoDTrejo:masterfrom
Conversation
This commit is intended to be a report and a suggestion, I'm not versed about this utility neither about your plans on improving it. I've found useful to run the child giving it direct access to parent's stdio streams (through 'inherit') rather than piping them. I was developing an interactive command line utility that makes use of `process.stdin.setRawMode` so I needed access to the tty stream in the child. With this little change `runjs` runs perfectly as expected. My cli thinks it's executed directly on a terminal, and each time a file is modified the cli is restarted. With the bind to 'exit' event, when the cli process finishes the runjs process finishes too, so there's no need of killing it manually with `Ctrl^C`. Congratulations for this tool and its clean code, a quick read allowed me to know where I had to type. Cheers L.
Owner
|
Have you been able to figure out why inheriting the stdio makes letters show up really slowly in the child? I want to use it this way (and run.js 2.0 will use it this way) I'm just sad that it messes up user typing :( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This commit is intended to be a report and a suggestion, I'm not versed about this utility neither about your plans on improving it.
I've found useful to run the child giving it direct access to parent's stdio streams (through 'inherit') rather than piping them.
I was developing an interactive command line utility that makes use of
process.stdin.setRawModeso I needed access to the tty stream in the child.With this little change
runjsruns perfectly as expected. My cli thinks it's executed directly on a terminal, and each time a file is modified the cli is restarted.With the bind to 'exit' event, when the cli process finishes the runjs process finishes too, so there's no need of killing it manually with
Ctrl^C.Congratulations for this tool and its clean code, a quick read allowed me to know where I had to type.
Cheers
L.