delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1994/08/29/14:58:51

Date: Mon, 29 Aug 94 11:28:11 EDT
From: jes AT mbio DOT med DOT upenn DOT edu (Joe Smith)
Posted-Date: Mon, 29 Aug 94 11:28:11 EDT
To: babcock AT cfa DOT harvard DOT edu
Cc: djgpp AT sun DOT soe DOT clarkson DOT edu, t DOT hulek AT ic DOT ac DOT uk
Subject: Catastrophic problems with v. 1.12

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

Just in case anyone actually sets out to do this: please handle the
SHELL variable: If SHELL is set, use it instead of COMSPEC and the
switch should be '-c' instead of '/c'.  This will allow folks to use
shells other than COMMAND.COM.  Of course if you're exec'ing a '.bat'
file then you may want to use COMMAND ;-)

<Joe

 Joe Smith
 University of Pennsylvania                    jes AT mbio DOT med DOT upenn DOT edu
 Department of Physiology                      (215) 898-0485 - work
 Philadelphia, PA 19104-6059                   (609) 854-6428 - home

- Raw text -


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