delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/12/28/17:04:25

Date: Mon, 27 Dec 1999 08:41:30 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Laurence Withers <lwithers AT lwithers DOT demon DOT co DOT uk>
cc: djgpp AT delorie DOT com
Subject: Re: Accessing stdin, stdout and stderr?
In-Reply-To: <D3oJTCAsflZ4EASq@lwithers.demon.co.uk>
Message-ID: <Pine.SUN.3.91.991227084113.23885G-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sun, 26 Dec 1999, Laurence Withers wrote:

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

That's what redirection is about: you assign the file handle to a
different file/device.

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

Please tell more about what does ``immediate access to stdout and
stderr'' mean.  What exactly are you trying to accomplish?

As for the keyboard input, this should be automatic: if you hook the
keyboard interrupt, you will see all the keystrokes, even those
pressed when the child program runs.  What you do with these
keystrokes is another matter; please describe what you want to do with
them in more detail.

- Raw text -


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