www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/11/04/04:08:44

Date: Wed, 4 Nov 1998 11:01:53 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: djgpp AT delorie DOT com
Subject: Re: redirecting stdout from within a DJGPP program
In-Reply-To: <363f1a74.87694419@news.cis.yale.edu>
Message-ID: <Pine.SUN.3.91.981104110134.25255I-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com

On Tue, 3 Nov 1998, Mapson wrote:

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

Since the previous way was also invoking a subsidiary batch file, it
was also suspending your program.  So I really don't see where's the
difference.  Maybe if you explained more about how did you use the
batch files, the problems will become clearer.

Conceptually, `system' is the same as typing the command on the
command line.  In most compilers, it actually invokes the shell and
passes it its argument.  DJGPP doesn't do that, because stock DOS
shell is too dumb, but its emulation of the shell is very compatible
(but it also provides several important extensions).

I suggest to read the documentation of `system' in the libc reference,
it explains many of the subtle features of the DJGPP implementation.
Then ask more specific questions, if something there is not clear
enough.

- Raw text -


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