Comment 12 for bug 200436

Revision history for this message
Alexander Belchenko (bialix) wrote : Re: [Bug 200436] [NEW] bazaar 1.2 (standalone) failed in cygwin shell

Martin Pool пишет:
> *** This bug is a duplicate of bug 69851 ***
> https://bugs.launchpad.net/bugs/69851
>
>> There is nothing about friendliness IMO. It's only about using native functions
>> from msvcrt.dll (getpass)
>
> So is that the heart of the problem, that getpass fails? Do we know
> what happens exactly? If we call it from inside cygwin does it fail
> and raise an exception, or just terminate the process?
>
In my understanding of situation getpass uses low-level access to stdin.
If there is no real terminal something bad will happen, i.e. it's effectively
blocking execution of bzr in the method get_nonechoed_password.

I sent a patch prevents this situation by explicit check sys.stdin.isatty()

http://bundlebuggy.aaronbentley.com/request/%3C47D70669.60702%40ukr.net%3E

But this not the end of story. There is another possible situation with Cygwin.
If I run Cygwin's bash console and from it run 'startx' then I could working in xterm
with Cygwin's terminal console floating on windows desktop. In this case the prompt for password
appears not in xterm window but in original terminal behind it!
In this case if user has xterm open in maximized mode he/she could not realize that
in back window something happens and waiting for the input.