delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2000/02/08/05:46:33

Date: Tue, 8 Feb 2000 09:42:09 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: arcadepreserv AT hotmail DOT com
cc: djgpp AT delorie DOT com
Subject: Re: How Do I start another DOS program from DJGPP ?
In-Reply-To: <87nb7r$5gb$1@nnrp1.deja.com>
Message-ID: <Pine.SUN.3.91.1000208094014.28790K@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: dj-admin AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Mon, 7 Feb 2000 arcadepreserv AT hotmail DOT com wrote:

> I am looking for a dosexex("myprog.exe");
> 
> type of command, it must be there but what is the syntax and include
> needed ?

Look up `system' and `spawn*' in the library docs.

> And then I need the calling program to proceed while the called program
> executes, how do I do this ?

On plain DOS, you can't.  On Windows, run the subsidiary program like 
this:

	system("start prog.exe");

> a last question, which is not really essential is how can I read the
> output from the called program from the calling program ?

Use `popen' and `pclose' from the library.  (Note that this won't work 
with the above "start" trick.)

- Raw text -


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