Message-ID: From: George Kinney To: "'djgpp AT delorie DOT com'" Date: Tue, 28 Dec 1999 14:21:18 -0500 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2448.0) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01BF5168.B7384992" Reply-To: djgpp AT delorie DOT com This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01BF5168.B7384992 Content-Type: text/plain From: Laurence Withers Newsgroups: comp.os.msdos.djgpp Subject: Accessing stdin, stdout and stderr? Date: Sun, 26 Dec 1999 18:01:16 +0000 Message-ID: NNTP-Posting-Host: lwithers.demon.co.uk X-NNTP-Posting-Host: lwithers.demon.co.uk:194.222.80.1 X-Trace: news.demon.co.uk 946231383 nnrp-09:22290 NO-IDENT lwithers.demon.co.uk:194.222.80.1 X-Complaints-To: abuse AT demon DOT net MIME-Version: 1.0 X-Newsreader: Turnpike (32) Version 4.01 To: djgpp AT delorie DOT com >A program I am writing runs external programs through the "system" >command. However, I need to access their stdin, stdout and stderr >streams. I have looked at the 'redir' sources, but they just redirect >through file handles. I need more control than this: I need to >immediately have access to stdout and stderr, and stdin will be handled >by my own keyboard handler. Is this possible? look into the library function: popen It will allow you to open a programs input or output stream for writing and reading, but I don't know that it will give you the kind of control you seem to be after. Anyways, its a start. ------_=_NextPart_001_01BF5168.B7384992 Content-Type: text/html

From: Laurence Withers <lwithers AT lwithers DOT demon DOT co DOT uk>
Newsgroups: comp.os.msdos.djgpp
Subject: Accessing stdin, stdout and stderr?
Date: Sun, 26 Dec 1999 18:01:16 +0000
Message-ID: <D3oJTCAsflZ4EASq AT lwithers DOT demon DOT co DOT uk>
NNTP-Posting-Host: lwithers.demon.co.uk
X-NNTP-Posting-Host: lwithers.demon.co.uk:194.222.80.1
X-Trace: news.demon.co.uk 946231383 nnrp-09:22290 NO-IDENT lwithers.demon.co.uk:194.222.80.1
X-Complaints-To: abuse AT demon DOT net
MIME-Version: 1.0
X-Newsreader: Turnpike (32) Version 4.01  <WCcCG$mmNL32sYSf46vBeC80CR>
To: djgpp AT delorie DOT com
>A program I am writing runs external programs through the "system"
>command. However, I need to access their stdin, stdout and stderr
>streams. I have looked at the 'redir' sources, but they just redirect
>through file handles. I need more control than this: I need to
>immediately have access to stdout and stderr, and stdin will be handled
>by my own keyboard handler. Is this possible?

look into the library function: popen

It will allow you to open a programs input or output stream for writing and
reading, but I don't know that it will give you the kind of control you seem
to be after.  Anyways, its a start.

------_=_NextPart_001_01BF5168.B7384992--