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
Stdin.echoMode is not reseted on crash #17743
Comments
This comment was originally written by @Fox32 My fault, it seems to work on Windows. But I have still issueson OSX and Linux. I use the following test program: import 'dart:io'; void main(List<String> arguments) { |
I just tested this in python where I see the same behavior with http://docs.python.org/2/library/curses.html. I'm not sure what the right thing to do is. While I agree that it's unexpected, it's needed if a person wants to write a tool that simply disables echo and returns. |
This comment was originally written by @Fox32 It would be possible to reset it myself on normal exit as I only have two exit points. On abnormal exit I could use the Zone interfaces to catch all unhandled errors and disable it. But a global handler is annoying during development. Something like a global finally block isn't available right? |
Not that I'm aware of. I'll discuss with the library team if they have any suggestions for this scenario. |
So, we're in the process of adding some ways of recovering, by running the program in a child isolate. However, we are still early in the process and the API is not yet in place. Have you tried encapsulating the program in another process? |
This comment was originally written by @Fox32 Thanks for that idea, I haven't thought about another process or isolate yet. I will look into that. |
This comment was originally written by @Fox32 I checked the possible solutions: void main(List<String> arguments) { Isolate.spawn(run, arguments).then((i) { i.addOnExitListener(rp.sendPort); return rp.single.then((_) { void run(List<String> arguments) { |
Removed Area-IO label. |
Issue #17746 has been merged into this issue. |
This comment was originally written by @Fox32 I just want to mention that is now possible to workaround this issue with addOnExitListener, works fine. |
This issue was originally filed by @Fox32
What steps will reproduce the problem?
What is the expected output? What do you see instead?
Echo mode is off. I would expect that it is enabled again. If the application exits without a crash, the echo mode is reseted.
What version of the product are you using? On what operating system?
Dart Editor version 1.3.0.dev_06_01 (DEV)
Dart SDK version 1.3.0-dev.6.1
Windows 8.1 64bit, Ubuntu, OSX
The text was updated successfully, but these errors were encountered: