delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1999/05/30/05:25:49

Date: Sun, 30 May 1999 12:20:38 +0300 (IDT)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: ^Hawk^ <Hawk AT DarkSoft DOT Net>
cc: djgpp AT delorie DOT com
Subject: Re: spawn !?
In-Reply-To: <37501cf1.71827221@news.luebeck.netsurf.de>
Message-ID: <Pine.SUN.3.91.990530122015.12571W-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Sat, 29 May 1999, ^Hawk^ wrote:

> I want to execute a simple command line like "d:\temp\temp.exe
> command1 command2 ..." or "temp.exe" or "temp.exe command1". The path
> / the program and the commands (if given) are all in the same string.
> 
> How can I execute those single strings via spawn or exec ?

You don't.  If the command line is given as a single string, you
should use `system', not `spawn'.  For example:

   int result = system ("d:\\temp\\temp.exe command1 command2");

> Ohh ... the program which I want to execute out of my program is a dos
> real mode program and it should not executed within the 640KB because
> there is not enough free if my own program runs.

??? DOS real-mode programs can *only* run in the low memory, below
1MB.  So you cannot get what you want, I'm afraid.

- Raw text -


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