delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2009/11/13/16:12:54

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.6 required=5.0 tests=BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
X-IronPortListener: Outbound_SMTP
From: "Buchbinder, Barry (NIH/NIAID) [E]" <BBuchbinder AT niaid DOT nih DOT gov>
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Date: Fri, 13 Nov 2009 16:12:10 -0500
Subject: RE: How to capture stderr of dos process running in bash shell??
Message-ID: <0105D5C1E0353146B1B222348B0411A2088722D749@NIHMLBX02.nih.gov>
References: <26341304 DOT post AT talk DOT nabble DOT com> <20091113184304 DOT GA18822 AT ednor DOT casa DOT cgf DOT cx>
In-Reply-To: <20091113184304.GA18822@ednor.casa.cgf.cx>
MIME-Version: 1.0
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.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

Christopher Faylor sent the following at Friday, November 13, 2009 1:43 PM
>On Fri, Nov 13, 2009 at 10:39:41AM -0800, 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 bas=
h 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.
>
>More likely it is writing to the console directly, rather like writing
>to "/dev/tty" on UNIX.

See also the Cygwin User's Guide:
http://cygwin.com/cygwin-ug-net/using-effectively.html#id322908

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