Mail Archives: djgpp/1998/11/03/10:32:56
On Tue, 3 Nov 1998 11:38:56 +0200 (IST), Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> wrote:
>
>On Tue, 3 Nov 1998, Mapson wrote:
>
>> There is one point in my program where I call another program (using
>> system("program.exe") ), and I am interested in redirecting (and
>> silencing at the console) the output of that program to a file I
>> already have opened for output. This is something I'd previously done
>> in a batch file with ">>"
>
>How about system("program.exe >> file")? Doesn't that do what you want?
I guess it does. And that sure is easy. If that is indeed the best way
to do it, do it I shall!
I've not used this system() command until a couple days ago. Now,
because I'm trying to negate the need for external batch files with
this compiler I've discussed elsewhere, I am relying on system() calls
heavily, and I am a bit paranoid of it and of what penalties I may
have to pay for suspending my program while I let other programs do a
bunch of stuff. If you know of any particular dangers or "no-nos"
regarding system() usage with DJGPP, please post.
Thanks much, everybody!
- Raw text -