Search the FAQ Archives

3 - A - B - C - D - E - F - G - H - I - J - K - L - M
N - O - P - Q - R - S - T - U - V - W - X - Y - Z
faqs.org - Internet FAQ Archives

comp.os.msdos.programmer FAQ part 3/5
Section - - How can I redirect stderr?

( Part1 - Part2 - Part3 - Part4 - Part5 - Single Page )
[ Usenet FAQs | Web FAQs | Documents | RFC Index | Neighborhoods ]


Top Document: comp.os.msdos.programmer FAQ part 3/5
Previous Document: - How can I redirect the output of a batch file?
Next Document: - How can my program open more files than DOS's limit of 20?
See reader questions & answers on this topic! - Help others by sharing your knowledge

 Use freopen(..., stderr) and then execute the desired command via
 system(). There are downloadable versions of programs to do this.

 This file includes TP4 source and an executable:
 <http://www.simtel.net/pub/pd/50430.html>

 A C example is downloadable as:
 <http://www.simtel.net/pub/pd/41772.html>

 I compiled it with MSC 7.0, and it works fine with one exception:
 Contrary to the included comments, redirected output starts writing at
 the beginning of the output file rather than appending. That is easily
 solved by adding "fseek(stderr, 0L, SEEK_END);" after the freopen() call
 for stderr.

 A reader comp.os.msdos.programer has created a utilitiy that can capture
 console output. It can be found at:
 <http://www.simtel.net/pub/dl/11141.shtml>

User Contributions:

Comment about this article, ask questions, or add new information about this topic:




Top Document: comp.os.msdos.programmer FAQ part 3/5
Previous Document: - How can I redirect the output of a batch file?
Next Document: - How can my program open more files than DOS's limit of 20?

Part1 - Part2 - Part3 - Part4 - Part5 - Single Page

[ Usenet FAQs | Web FAQs | Documents | RFC Index ]

Send corrections/additions to the FAQ Maintainer:
jeffrey@carlyle.org (Jeffrey Carlyle)





Last Update March 27 2014 @ 02:11 PM