X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.1 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Date: Wed, 13 May 2009 12:53:19 -0700
From: Gary Johnson <garyjohn@spocom.com>
To: cygwin@cygwin.com
Subject: Re: WMIC
Message-ID: <20090513195319.GA11800@KCJs-Computer>
Mail-Followup-To: cygwin@cygwin.com
References: <64de84830905120629h1f07770ak9b91915c41f868ec@mail.gmail.com> <1M3srY-208Trs0@fwd06.aul.t-online.de> <64de84830905120953g4d02f37fmf33f164f6aa27041@mail.gmail.com> <4A09F803.5060509@gmail.com> <4A0B0FC2.3020707@t-online.de>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
In-Reply-To: <4A0B0FC2.3020707@t-online.de>
User-Agent: Mutt/1.4.2.2i
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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

On 2009-05-13, Christian Franke wrote:
> Dave Korn wrote:
> >Bruno Galindro da Costa wrote:
> >  
> >>Christian,
> >>
> >>   It Works perfectly for both! Can you explain why that commands
> >>works and not only "wmic cpu list full"?
> >>    
> >
> >  
> 
> The wmic.exe file imports console functions like SetConsoleMode() and 
> SetConsoleScreenBufferSize() from kernel32.dll. I presume that wmic 
> performs some direct console I/O which conflicts with Cygwin's tty. This 
> can be prevented by redirecting the standard input. But then wmic 
> creates an empty file 'TempWmicBatchFile.bat' in current directory ...
> 
> 
> >>>The following works for me in Cygwin console (notty, tty, and mintty) on
> >>>XP:
> >>>
> >>>$ echo '' | wmic cpu list full
> >>>
> >>>or
> >>>
> >>>$ wmic cpu list full </dev/null
> >>>      
> >
> >  So, are some of you guys using a DOS console, and some using
> >rxvt/xterm/whatever gui console?
> >
> >  
> 
> There is no difference in this case. Wmic hangs in Windows console, 
> mintty, rxvt and xterm if run without redirection from a Cygwin shell.

FWIW, these symptoms appear to be the same ones that nickle
exhibits:  works fine when input is not from a tty or console, but
otherwise hangs after displaying its prompt.  I reported the problem
to the cygwin-ports-general list (nickle is a cygwinports package).
The reply from Yaakov was that he could reproduce the problem but
didn't have a solution and didn't have time to investigate much
further.  I looked briefly at the code, but didn't get very far and
haven't had time to look further either.

Regards,
Gary



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

