Mail Archives: djgpp/1998/02/10/06:22:11
On Mon, 9 Feb 1998, Ali Bharmal wrote:
> The question is; how do I capture any screen output from these programs? Is
> there an alternative to system() which pipes the output into a buffer, or am I
> going to have to redirect output to a file which I then read. I'd rather the
> former, as I'd like the program to be minimum-impact on the system.
Use `popen' and `pclose' from the library, they will redirect the output
and let you read it (assuming that the programs you run write to stdout
using file I/O, not direct screen writes).
- Raw text -