Comments (5)
The general idea would be to:
- save initial console modes at startup
- just before a win32 process is started or resumed, save then restore applicable console modes (might be none if everything is redirected) to initial ones (or profit from an already existing restoration, in which case reference count it)
- just after a win32 process is stopped or suspended, and if no other win32 processes using such applicable console modes restored to initial ones, restore applicable console modes again to WSL ones.
We will default to support interactive win32 programs, and maybe add a flag to keep stdin alone (for batch works). IMO this choice is better than adding a flag for interactive usage just to keep Ctrl-Z working by default on e.g. builds. However, if this really breaks Ctrl-Z, some people who might have taken the habit of Ctrl-Z'ing GUI programs, then bg them (because they use to do that under a GNU/Linux system) might be irritated by such breakage. That's one more argument if favor of detection of Win32 GUI programs.
from cbwin.
commit ab86dc8
Unfortunately this does not fix all the issues in the AU edition (maybe because of issues in WSL/Console implementation?), but it works quite well in the last Insider build 14946
The wcmd echo.
workaround also is not needed anymore.
from cbwin.
However, Ctrl-C while running e.g. wcmd dir /s c:\\
now kills the whole console. I will try to avoid that...
from cbwin.
I think there are several steps needed to handle Ctrl-C "properly":
- setup a handler in outbash (we cannot just ignore it, because that would be inherited by all children processes)
- start bash.exe in a way that makes it ignore Ctrl-C
- launch wanted programs in another way to keep Ctrl-C effective for them
from cbwin.
ctrl-c fixed by 771616d
closing this ticket to document remaining issues more clearly
from cbwin.
Related Issues (20)
- wrun: can't translate a WSL VolFs path to a Win32 one HOT 7
- Default command handler HOT 10
- some win32 console programs "sometimes" do line feed instead of new line, but a workaround seems possible HOT 1
- a cmd-like behavior distinguishing between console / GUI target programs might be useful HOT 1
- backgrounded & force redirected caller => SIGTTIN
- Use double quotes to prevent word splitting may be better HOT 12
- Problem with arguments containing the character "&" HOT 1
- wcmd cmd no longer laggy, but eats characters HOT 1
- Let cbwin in session mode launch multiple wcmd instances in parallel HOT 11
- sockets for redirections are not using any security HOT 6
- wstart /mnt/c/windows does not work HOT 7
- Not work inside zsh HOT 14
- behavior of environment variable inconsistent in regards to case sensitivity HOT 1
- No terminal support HOT 6
- Vagrant output doesn't wrap correctly HOT 4
- Native Windows support for launching Windows applications HOT 1
- Some inputted characters skipped in Docker interactive terminal HOT 1
- Starting parameters for bash.exe
- Can't remove cbwin from my pc HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cbwin.