www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/26/13:44:42

Date: Fri, 26 Aug 94 10:07:23 EDT
From: peprbv AT cfa0 DOT harvard DOT edu (Bob Babcock)
To: djgpp AT sun DOT soe DOT clarkson DOT edu
Cc: t DOT hulek AT ic DOT ac DOT uk
Subject: Re: Catastrophic problems with v. 1.12
Reply-To: babcock AT cfa DOT harvard DOT edu

> Yes, you have to start command.com, the _command interpreter_, to
> execute commands in a batch file:
> 
> system("command.com /c mybat.bat arg1 arg2");

One can certainly argue about how system() should work, but other DOS
compilers don't seem to require this.  For example, Borland and Microsoft let
you start a subshell by system("").  I just took a quick look at the BC 3.1
system() source code, and it appears to concatenate COMSPEC, /c and your
args, then call spawn.

- Raw text -


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