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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Terminal I/O. #62
base: main
Are you sure you want to change the base?
Terminal I/O. #62
Changes from 1 commit
7aca316
27fd0c1
13ab8d5
bb41d10
cd345f6
b2c66d4
e13b66e
1c73e9e
9fc6912
0cc5d84
1db49ce
a80d9b9
c150e79
c4d72d7
d505a24
ab17d03
78f0bba
b8a0cb7
020eeb7
a2e16d6
5530ddb
5ca74cd
7826668
a14f18b
78b914e
ba8694d
ffe05de
37388d6
02905b7
2a76ee6
e0ffa21
b6c1539
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should there also be an interface that's equivalent to opening
CON
or/dev/tty
? this is used by things likesudo tee
where the inputs/outputs may be redirected butsudo
still accesses the controlling terminal to write out the password prompt and read in the password.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be straightforward to have an API that returns a
terminal-input
.terminal-output
, and streams for the controlling terminal (alongside the stdio functions). That's independent of what theterminal-input
andterminal-output
interfaces look like though, so that could be proposed separately.A potential consideration is that we may not always want sandboxed programs to be able to do that, because that would mean they could bypass stdio redirects and potentially grab input from the terminal meant for another application. So we'd want to think through the use cases.