www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/09/30/16:04:40

Date: Tue, 30 Sep 1997 15:59:36 -0400 (EDT)
From: "Art S. Kagel" <kagel AT ns1 DOT bloomberg DOT com>
Reply-To: kagel AT ns1 DOT bloomberg DOT com
To: Laine <laine AT iwn DOT fi>
Cc: djgpp AT delorie DOT com
Subject: Re: How to use spawn* / execl?
In-Reply-To: <01bcce73$cb46b1a0$463e64c2@default>
Message-Id: <Pine.D-G.3.96.970930155801.21456E-100000@dg1>
Mime-Version: 1.0

On 30 Sep 1997, Laine wrote:

> 
> Hello!
> 
> I want to run a dos bat-file from my own c-program that
> I've done using DJGPP. I found in the syntax help in
> Rhide the commands spawn* and execl, but I don't know
> wich of the 6 (I think it was six) different spawn-functions
> should I use, or wich of the exec-functions. And how do
> they work. I couldn't get it from the help in Rhide.

Just use the system() function it calls on your shell to execute the
command and will work with bat scripts:

	char command[] = "myscript";
...
	system( command );
...

Art S. Kagel, kagel AT bloomberg DOT com

- Raw text -


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