From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29875 invoked by alias); 20 Jun 2012 11:14:15 -0000 Received: (qmail 29866 invoked by uid 22791); 20 Jun 2012 11:14:14 -0000 X-SWARE-Spam-Status: No, hits=-5.3 required=5.0 tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FROM,KHOP_RCVD_TRUST,KHOP_THREADED,RCVD_IN_DNSWL_LOW,RCVD_IN_HOSTKARMA_YE X-Spam-Check-By: sourceware.org Received: from mail-pb0-f43.google.com (HELO mail-pb0-f43.google.com) (209.85.160.43) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 20 Jun 2012 11:14:02 +0000 Received: by pbcwz7 with SMTP id wz7so501967pbc.2 for ; Wed, 20 Jun 2012 04:14:01 -0700 (PDT) MIME-Version: 1.0 Received: by 10.68.240.73 with SMTP id vy9mr74803531pbc.102.1340190841633; Wed, 20 Jun 2012 04:14:01 -0700 (PDT) Received: by 10.66.82.6 with HTTP; Wed, 20 Jun 2012 04:14:01 -0700 (PDT) In-Reply-To: References: Date: Wed, 20 Jun 2012 11:14:00 -0000 Message-ID: Subject: Re: Ask for help on running interactive cmd in Mintty! From: Earnie Boyd To: cygwin@cygwin.com Content-Type: text/plain; charset=UTF-8 X-IsSubscribed: yes Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com X-SW-Source: 2012-06/txt/msg00355.txt.bz2 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 = ; > 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