delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2005/03/08/14:43:45

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
To: cygwin AT cygwin DOT com
From: Andrew DeFaria <Andrew AT DeFaria DOT com>
Subject: Re: Windows mysql CLI and Cygwin terminals
Date: Tue, 08 Mar 2005 11:26:17 -0800
Lines: 52
Message-ID: <d0kuq4$sbg$1@sea.gmane.org>
References: <422DF858 DOT 3080602 AT brunson DOT com>
Mime-Version: 1.0
X-Complaints-To: usenet AT sea DOT gmane DOT org
X-Gmane-NNTP-Posting-Host: cerebrus.lynuxworks.com
User-Agent: Mozilla Thunderbird 1.0 (X11/20041206)
In-Reply-To: <422DF858.3080602@brunson.com>
X-Gmane-MailScanner: Found to be clean
X-Gmane-MailScanner: Found to be clean
X-MailScanner-From: goc-cygwin AT m DOT gmane DOT org
X-MailScanner-To: cygwin AT cygwin DOT com
X-IsSubscribed: yes

Eric Brunson wrote:

> I found a reference to this problem in the July archives of this list, 
> but I have a little to add so I'm hoping someone may be able to give a 
> work around or note it as a bug.
>
> When trying to run the mysql (windows version) command line client, 
> the process seems to hang, but only if you're trying to interact with 
> the server.  In other words, if you supply a query to execute, the 
> client properly returns the expected result, but when you would either 
> be prompted for a password or be given an interactive prompt, the 
> terminal hangs.
>
> I believe this to be a problem with the interaction between a cygwin 
> terminal (either a bash prompt or an xterm) and the client.  When the 
> client is run from a command.com or a cmd.exe window, it works fine.  
> When it is run from an xterm, it just hangs.  When run from a bash 
> window you get the password prompt, but then every 2nd or 3rd 
> character is echoed to the screen rather than displayed as an asterisk 
> and when you hit ENTER, you get the hang.  Even if I start cmd.exe 
> from withing a bash window or xterm, I still get the aberrant behavior.
>
> They're obviously doing something spiffy with their termio to get the 
> hidden chars on the password and the command line editting and history 
> within the client.  Is there a better API the mysql devs could be 
> writing to to be compatible with both cygwin terminals and the dos 
> windows?  Or is there a work around I can set in my environment to get 
> windows compatible termio in my cygwin windows.

Is your bash session running in a "Windows window" or rxvt or something 
else? Are you sure it is indeed hanging and that it has not prompted you 
for something and you didn't see the prompt? I ask because it's a known 
issue that certain Windows executables do not understand ptys and rxvt 
uses ptys. The net result is that it appears to hang but in reality the 
prompt didn't work.

For example, cleartool (part of Rational's Clearcase product) does not 
issue prompts when run under rxvt because of the pty issue but otherwise 
functions OK. Normally I "cleartool <command>" which executes the 
command and otherwise doesn't prompt. But if you just type cleartool 
itself it goes into command prompting mode and issues the prompt 
"Cleartool>". You can see this prompt if run from a "Windows window" but 
the prompt doesn't display at all when run from rxvt. You can then type 
"exit" or any other cleartool command and it does work - but if you 
didn't know that you might say that it was hanging....

Also, at one time there was a mysql monitor program compiled in pure 
Cygwin. This mysql program has no problems running under ptys and even 
does command history courtesy of readline. I may even have a copy at home...
-- 
Ever notice that anyone going slower than you is an idiot, but anyone 
going faster is a maniac?


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019