Giter Site home page Giter Site logo

Comments (7)

trofimander avatar trofimander commented on July 20, 2024

Confirm: that fixes the hang on Windows 10.

from winpty.

leycec avatar leycec commented on July 20, 2024

Could someone post that as a pull request? Pleaaaase.

from winpty.

rprichard avatar rprichard commented on July 20, 2024

I think I understand what's happening. The new Windows 10 console rewraps the console lines when the console is resized. When the console is "frozen" (i.e. the "Select All" system command is active), writes to the console block. Presumably, with Windows 10, attempts to resize the console also block.

I really need to test with Windows 10, though.

I'm wondering what happens if one of the console programs prints new lines before/during the Win32Console::reposition call.

I suspect Windows 10's line rewrapping is going to confuse winpty. Normally, winpty tries to detect changes and send only changed lines, but with rewrapping, I think it's going to lose track of what's new.

from winpty.

aleherb avatar aleherb commented on July 20, 2024

Presumably, with Windows 10, attempts to resize the console also block.

No, it doesn't, but the selection is cleared. This is different to a Windows 7 console.

I'm wondering what happens if one of the console programs prints new lines before/during the Win32Console::reposition call.

I wonder what freezing the console during the reposition should actually protect. Printing lines does not affect window or buffer size.

I suspect Windows 10's line rewrapping is going to confuse winpty.

The only bad impact I have seen so far is, that a resize confuses editing of the current input line in cmd.exe, in particular history navigation. It seems to work fine with e.g. bash (+readline).

from winpty.

rprichard avatar rprichard commented on July 20, 2024

I tested programmatically resizing the console buffer while selection was in-progress, and it apparently hangs the Windows console, such that the conhost.exe process must be killed from the Task Manager. This actually seems like a Windows bug to me.

See https://github.com/rprichard/winpty/blob/win10/misc/Win10ResizeWhileFrozen.cc

from winpty.

rprichard avatar rprichard commented on July 20, 2024

I reported the conhost.exe hang to Microsoft: https://wpdev.uservoice.com/forums/266908-command-prompt/suggestions/9941292-conhost-exe-hangs-in-win10-if-setconsolescreenbuff

from winpty.

rprichard avatar rprichard commented on July 20, 2024

Fixed by d464089. Unfortunately, conhost.exe can still hang if something other than winpty resizes the console.

from winpty.

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.