Giter VIP home page Giter VIP logo

Comments (5)

xilun avatar xilun commented on July 20, 2024

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.

xilun avatar xilun commented on July 20, 2024

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.

xilun avatar xilun commented on July 20, 2024

However, Ctrl-C while running e.g. wcmd dir /s c:\\ now kills the whole console. I will try to avoid that...

from cbwin.

xilun avatar xilun commented on July 20, 2024

I think there are several steps needed to handle Ctrl-C "properly":

  1. setup a handler in outbash (we cannot just ignore it, because that would be inherited by all children processes)
  2. start bash.exe in a way that makes it ignore Ctrl-C
  3. launch wanted programs in another way to keep Ctrl-C effective for them

from cbwin.

xilun avatar xilun commented on July 20, 2024

ctrl-c fixed by 771616d
closing this ticket to document remaining issues more clearly

from cbwin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.