Question

msys is not opening programs interactively. For example, if I enter python, the program hangs. Even mysql hangs after I enter my password (entering the password is interactive, though). When I enter pico, I get "Redirection is not supported." bc does not hang, though. python -i opens an interactive session.

I've tried different terminal emulators, and I get the same results. I've tried Console and Mintty. Therefore, I'm led to believe this is an issue with sh, not the terminal emulator.

I am running Vista. I installed msys on my work PC, which runs Windows 7, and I don't have any issues with running interactive programs on msys.

I've read that this is expected behavior, but this used to work. I'm thinking that some install corrupted something. I even tried reinstalling msys, and I get the same results. I also cannot do system restore for some reason.

Any clues?

Here is some example output:

$ python
<ctrl-C> from this

$ mysql -u root -p
Enter password: ****
<ctrl-C> from this

This time I used Console. In the "Shell:" textbox I put C:/msys/1.0/bin/sh.exe --login -i When I press the enter key, a newline is added, i.e., the terminal scrolls. The same thing happens from the terminal provided by msys. This used to work before. Furthermore, I installed msys on another machine, which runs Windows 7, and python does not hang. If I use python -i, there is no hang.

Here's the output of running sh from cmd:

C:\Users\jpp>sh
sh-3.1$
sh-3.1$
sh-3.1$ python
Python 2.7.3 (default, Apr 10 2012, 23:31:26) [MSC v.1500 32 bit (Intel)] on win
32
Type "help", "copyright", "credits" or "license" for more information.
>>>
Was it helpful?

Solution

Have you tried the winpty (https://github.com/rprichard/winpty) project? For details, check my answer here: https://stackoverflow.com/a/23164362/1034436

Your issue seems similar to mine with mysql, hg and python, but unlike you, I don't have an example of it working without winpty.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top