delorie.com/archives/browse.cgi | search |
X-Recipient: | archive-cygwin AT delorie DOT com |
X-Spam-Check-By: | sourceware.org |
Date: | Sat, 14 Nov 2009 13:55:56 -0500 |
From: | Christopher Faylor <cgf-use-the-mailinglist-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: How to capture stderr of dos process running in bash shell?? |
Message-ID: | <20091114185556.GA15089@ednor.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
References: | <26341304 DOT post AT talk DOT nabble DOT com> <4AFE14EB DOT 5020305 AT gmail DOT com> |
MIME-Version: | 1.0 |
In-Reply-To: | <4AFE14EB.5020305@gmail.com> |
User-Agent: | Mutt/1.5.20 (2009-06-14) |
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 |
On Sat, Nov 14, 2009 at 02:24:43AM +0000, Dave Korn wrote: >aputerguy wrote: >>I am trying to capture the error messages of 'subinacl.exe' (a dos >>program included with Windows 2003 toolkit) which I am running from a >>bash script. >> >>However both the stderr and stdout of the process seem to go to bash >>stdout since redirecting bash stderr (2>) doesn't seem to have any >>effect. >> >>I assume this is because the dos process is running in a bash shell. >> >>Still, I was wondering whether there are any 'tricks' to somehow >>capture it. > >It's not about whether it's running in one kind of shell or the other; >what matters is whether it is running in a DOS console or a GUI-style >thing like xterm or rxvt. In Cygwin GUI terminals, stdin and stdout >are connected to pipes, rather than to a win32 console device, which >does confuse some win32 applications. But that is clearly not the case here since stdout and stderr are being bypassed and text is still showing up on the screen. That is not a symptom of stdout/stderr being attached to a pipe. Although, hmm, on rereading it isn't clear that the output shows up on the screen. It sounds like the DOS program just might not differentiate between stdout and stderr. cgf -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |