msys not flushing output

前端 未结 2 1231
渐次进展
渐次进展 2020-12-22 04:20

I\'m using mingw with msys and mintty on windows. I have a problem that msys and mintty are somehow not flushing output until a command is finished. This means I can\'t real

相关标签:
2条回答
  • 2020-12-22 04:26

    This can be an issue when msys uses the rxvt shell under a number of scenarios. In cases where I see this problem, I ask msys to use the native Windows shell for its console. For example:

    C:\MinGW\msys\1.0\msys.bat --no-rxvt
    

    I thought that modern MSYS installations default to using the native shell as MSYS developers seem to prefer it. I have other issues with the native shell that drive me to use the rxvt shell, so I do infrequently run into this issue.

    C:\MinGW\msys\1.0\msys.bat --rxvt
    

    I find that the rxvt shell usually works fine except for certain applications that are built as "console" utilities meant to run from a command-line.

    0 讨论(0)
  • 2020-12-22 04:38

    The only thing that worked for me was to precede the command with winpty ...

    $ winpty java ClassName
    

    It causes unbuffered output to be 3x slower and buffered output to be 5x slower (in my case, with Java).


    To always have a command invisibly invoked by winpty ...

    $ cd ~
    $ pwd -W
    

    ... add the following line to .bashrc ...

    alias java="winpty java"
    

    ... then restart terminal and ignore the (one-time) warning message.

    0 讨论(0)
提交回复
热议问题