TIP: Click on subject to list as thread! ANSI
echo: os2prog
to: Jonathan de Boyne Pollard
from: Mark Kimes
date: 1996-02-11 18:09:06
subject: Re: Executing a program?

Jd>  Interesting, that.  Everyone else (most MAKE utilities, and most
 Jd>  programs that allow you to "shell out") uses COMSPEC. 
Even CMD uses
 Jd>  COMSPEC, to determine what shell to start for the START and DETACH
 Jd>  commands when an internal command or batch file is specified.

 Jd>  The only people that I've encountered that use OS2_SHELL are Borland,
 Jd>  and now you.

I tried to cover all the bases:

  char *env;

  env = getenv("COMSPEC");
  if(!env)
    env = getenv("OS2_SHELL");
  if(!env)
    env = "CMD.EXE";

--- XHEd-OS/2 1.22
* Origin: The Pit (1:380/16)
SEEN-BY: 50/99 78/0 270/101 620/243 711/401 409 410 413 430 808 809 934 955
SEEN-BY: 712/407 515 517 628 713/888 800/1 7877/2809
@PATH: 380/25 270/101 712/515 711/808 809 934

SOURCE: echomail via fidonet.ozzmosis.com

Email questions or comments to sysop@ipingthereforeiam.com
All parts of this website painstakingly hand-crafted in the U.S.A.!
IPTIA BBS/MUD/Terminal/Game Server List, © 2025 IPTIA Consulting™.