delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/20/16:06:21

From: mfb AT mbunix DOT mitre DOT org (Michael F Brenner)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: How do I re-direct errors/warnings to file?
Date: 20 Jan 1997 15:48:23 GMT
Organization: The MITRE Corporation
Lines: 19
Message-ID: <5c0447$c2t@top.mitre.org>
References: <Pine DOT SUN DOT 3 DOT 91 DOT 970119172228 DOT 23317F-100000 AT is>
NNTP-Posting-Host: mbunix.mitre.org
Summary: DOS Batch file running many gccs does not stop on diagnostic
Keywords: DOS batch gcc diagnostic redir stderr
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

The question was asked how to deal with diagnostics that are given
to stderr instead of to stdout. The responses included (a) it is
good to put non-fatal errors to stderr, and (b) use redir to 
put them stdout. Mike Brenner identified that (a) DOS out of the
box does not redirect or work with stderr and therefore only
fatal errors should be written there and (b) redir does not
always (or ever) transmit the exit code of programs (although
in fatal exceptions redir sometimes fails which has the same
effect as transmitting a bad exit code). 

Eli responsed: If you are talking about passing the exit codes, then 
please give an example where this is a problem when running them with redir.

-----------------

An example would be a batch file which runs many gccs in a row under
various languages (c, gnat, f77). It would be a better development
environment if that batch file could be set up to stop executing at the
first diagnostic message.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019