X-Spam-Check-By: sourceware.org
Message-ID: <465FF5E2.2090406@go4more.de>
Date: Fri, 01 Jun 2007 12:33:06 +0200
From: Albrecht Schlosser <cygwin@go4more.de>
User-Agent: Thunderbird 1.5.0.9 (Windows/20061207)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: ssh session hangs while running cmd on remote server
References: <10900723.post@talk.nabble.com> <465F2B22.5000502@cygwin.com> <20070531201428.GB21273@ednor.casa.cgf.cx> <465F2F94.503@cygwin.com> <20070531203100.GB21388@ednor.casa.cgf.cx> <10903320.post@talk.nabble.com>
In-Reply-To: <10903320.post@talk.nabble.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

KenLee wrote:
> I have tried ssh using both interactive and command line mode, and I get the
> same results.  That is - sorry for being pedantic about this - I had invoked
> ssh first with the command line option, and it worked.  I invoked ssh again
> with the command line again, but it hung this time.  Then I just invoked ssh
> on its own, and entered the commands one at a time, and it hung again.  
>
> Then I ran cygwin directly on the remote server (thinking that it's the VB
> script causing the problem), so I entered cmd /c update.kcu (without any
> ssh) and it worked just fine.  
>   
Maybe it doesn't "hang" at all ...

Something I can see is that a (windows console) program _seems_ to hang, 
but actually it doesn't. stdout seems to be (block) buffered when run 
from an xterm or rxvt session, but unbuffered when run from a local 
standard cygwin window.

One test to see what happens would be to run the program with stdin 
redirected to /dev/null to get an error message:

cmd /c update.kcu < /dev/null

When I do this, I can see the program's prompt and some output that 
would be missing otherwise.

What happens, if you do that ?

Albrecht

P.S. BTW: Is there a way to set stdout to unbuffered without modifying 
the windows console program?


--
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/

