Mail Archives: djgpp/1994/08/29/14:58:51
> 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 -