Skip to content
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

tty: remove NODE_TTY_UNSAFE_ASYNC #12057

Closed
wants to merge 1 commit into from
Closed

Conversation

addaleax
Copy link
Member

Rebased version of #10393 which has more or less stalled, plus addressing my own comment there.

/cc @Fishrock123 @nodejs/ctc

Nothing but trouble can ever come from it.
@addaleax addaleax added ctc-review semver-major PRs that contain breaking changes and should be released in the next major version. tty Issues and PRs related to the tty subsystem. labels Mar 27, 2017
@nodejs-github-bot nodejs-github-bot added the tty Issues and PRs related to the tty subsystem. label Mar 27, 2017
@addaleax addaleax mentioned this pull request Mar 27, 2017
3 tasks
@addaleax addaleax added this to the 8.0.0 milestone Mar 27, 2017
@addaleax
Copy link
Member Author

@Fishrock123
Copy link
Contributor

I'll update the original today if desired

@addaleax
Copy link
Member Author

@Fishrock123 Do whatever makes the most sense to you, I just did this because I’d like to see it land in time for 8.0.0

@Fishrock123
Copy link
Contributor

ok so maybe I don't have enough time / interest... carry on I guess

@Fishrock123
Copy link
Contributor

I don't think it makes any sense to block only on fd 0-2 though...

Plus that changes the behavior in yet another way 😬

@Fishrock123
Copy link
Contributor

If anyone doesn't want to block on their own FD, they can just call the method?

@addaleax
Copy link
Member Author

I don't think it makes any sense to block only on fd 0-2 though...

By that logic all Node.js streams should be blocking by default… these problems are about stdio, and that will cover the vast majority of all TTY streams.

Also, there’s similar code in lib/net.js for new net.Socket() already.

If anyone doesn't want to block on their own FD, they can just call the method?

Then we should add something for that to the public API.

@Fishrock123
Copy link
Contributor

Fishrock123 commented Mar 29, 2017

By that logic all Node.js streams should be blocking by default… these problems are about stdio, and that will cover the vast majority of all TTY streams.

if you don't block to TTYs the same silly (esp interleaving) problems manifest. Was there any issue with it behaving as it has been? I am -1 on changing that to be async by default in some cases.

@addaleax
Copy link
Member Author

if you don't block to TTYs the same silly (esp interleaving) problems manifest.

Again, that’s true for any stream if you open it multiple times? Also, what’s special about stdio is that the API (and console.* in particular) encourages you to act like the writes are synchronous…

I’m dropping 889239b24f1237e69c5b4fdcc1f5df10586a94ec from this PR though, let’s save this discussion for something less time-constrained…

@addaleax
Copy link
Member Author

Landed in 1b63fa1

@addaleax addaleax closed this Mar 31, 2017
@addaleax addaleax deleted the tty-async branch March 31, 2017 20:04
addaleax pushed a commit that referenced this pull request Mar 31, 2017
Nothing but trouble can ever come from it.

PR-URL: #12057
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@Trott Trott removed the ctc-review label Apr 3, 2017
@jasnell jasnell mentioned this pull request Apr 4, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver-major PRs that contain breaking changes and should be released in the next major version. tty Issues and PRs related to the tty subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants