Mail Archives: djgpp/1998/07/19/19:04:11
Gerhard Gruber wrote:
>
> Destination: ams AT ludd DOT luth DOT se (Martin Str|mberg)
> From: Gruber Gerhard
> Group: comp.os.msdos.djgpp
> Date: 17 Jul 1998 23:48:48 GMT:
>
> >Jorge Ivan Meza Martinez (jimeza AT usa DOT net) wrote:
> >: I use system to launch a child program,
> >: it generates stdout and stderr,
> >: I am interested in take this data to be shown in my program,
> >: how can I do that in a portable way ?
> >
> >Umh; how about redirecting it to a file?
>
> That would be portable, but rather ugly. :) Also this means that you have to
> wait until the other program is finished and you can't launch programs that
> require interaction. I'd also be interested in how to doing this. Hmmm.
> Probably the author of RHIDE knows something because he did this there.
That would need multitasking, which is highly non-trivial to implement
under DOS. In what way does RHIDE do this? AFAIK, it either shows the
stderr of a program (like GCC), which you can do by dup2'ing fd 2 to a
file and displaying that, or it shells out, which is a simple case of
spawn.
--
Nate Eldredge
nate AT cartsys DOT com
- Raw text -