X-Recipient: archive-cygwin AT delorie DOT 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 To: cygwin AT cygwin DOT com Subject: Re: WMIC Message-ID: <20090513195319.GA11800@KCJs-Computer> Mail-Followup-To: cygwin AT cygwin DOT com References: <64de84830905120629h1f07770ak9b91915c41f868ec AT mail DOT gmail DOT com> <1M3srY-208Trs0 AT fwd06 DOT aul DOT t-online DOT de> <64de84830905120953g4d02f37fmf33f164f6aa27041 AT mail DOT gmail DOT com> <4A09F803 DOT 5060509 AT gmail DOT com> <4A0B0FC2 DOT 3020707 AT t-online DOT 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 AT cygwin DOT com; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT 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 >>> > > > > 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/