delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2012/06/20/11:07:38

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE
X-Spam-Check-By: sourceware.org
MIME-Version: 1.0
In-Reply-To: <CA+sc5mknGp1jFMJbWCD_rvNSZZN0kMw00GPkm3yMMixFSiDjeg@mail.gmail.com>
References: <CAKeUZfyjvJm08KveF4bVpWW7FORi5OHi8g_zH4rvJ2FPQFm9pQ AT mail DOT gmail DOT com> <CA+sc5mknGp1jFMJbWCD_rvNSZZN0kMw00GPkm3yMMixFSiDjeg AT mail DOT gmail DOT com>
Date: Wed, 20 Jun 2012 23:07:05 +0800
Message-ID: <CAKeUZfxUD5eu47j5+NLPu+ZXhYZr2iSzd6PyFca4RaP8jUY7pw@mail.gmail.com>
Subject: Re: Ask for help on running interactive cmd in Mintty!
From: Tian You <youtian001 AT gmail DOT com>
To: cygwin AT cygwin DOT com
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com>
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
X-MIME-Autoconverted: from quoted-printable to 8bit by delorie.com id q5KF7Z5p013484

I run the perl script in mintty.
If I run it in a Windows cmd.exe terminal, that works normally.
The ssh.exe is compiled in the Cygwin by myself.

Any other ideas about it?
What make me confusing is that why it behavious differently if I get
input from STDIN or not.

On Wed, Jun 20, 2012 at 7:14 PM, Earnie Boyd
<earnie AT users DOT sourceforge DOT net> wrote:
> On Wed, Jun 20, 2012 at 3:16 AM, Tian You wrote:
>> Hi All
>>
>> I'm running a perl program like this:
>>
>> ## script start ##
>> print "Please input:";
>> my $input = <STDIN>;
>> chomp $input;
>>
>> system("ssh to a remote machine to run an command");
>> print "done\n";
>> ## script done ##
>>
>> But after I input something and press enter, I can not see the output
>> of the ssh command.
>> Only after I press any key, the output flushes out to the screen.
>> Is the output buffered? But why it flushed after I press any one key?
>>
>
> Are you starting in mintty or rxvt?  What happens if you don't use
> either of those?  I suspect that your ssh isn't a Cygwin build and you
> are seeing the effect of PTY as pipes emulation.
>
> --
> Earnie
> -- https://sites.google.com/site/earnieboyd
>
> --
> Problem reports:       http://cygwin.com/problems.html
> FAQ:                   http://cygwin.com/faq/
> Documentation:         http://cygwin.com/docs.html
> Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
>

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


- Raw text -


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