www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/29/00:52:43

Date: Wed, 29 Jan 2003 07:47:44 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
X-Sender: eliz AT is
To: Charles Sandmann <sandmann AT clio DOT rice DOT edu>
cc: djgpp AT delorie DOT com
Subject: Re: gawk 3.1.1 DJGPP v2.04 on Windows 2000 Pro problem using system() function and LFNs
In-Reply-To: <3e37507d.sandmann@clio.rice.edu>
Message-ID: <Pine.SUN.3.91.1030129074407.11962A-100000@is>
MIME-Version: 1.0
Reply-To: djgpp AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Tue, 28 Jan 2003, Charles Sandmann wrote:

> > I tried using your suggestion in various ways, but in each
> > case it seems that, although cmd.exe is called at some point
> > and displays its version, etc., it never exits, so that each
> > time it is called another shell instance is opened.  In the
> > end I have had to type "exit" several times to exit the DOS
> > window.  This is Windows 2000 Pro, SP2.
> 
> Try 
>   SET SHELL=%COMSPEC% /C
> which seems to work better.

This could be very dangerous: SHELL's value is supposed to be a file 
name, not a shell command, so switches (such as "/C") should not be
used.

I actually think that if "SET SHELL=%COMSPEC%" has weird side effects, 
such as CMD not exiting, it might be some bug that should be 
investigated.  The net effect of "SET SHELL=%COMSPEC%" on how the library 
function `system' works should be the same as not having SHELL set at 
all, and that definitely works, at least on some systems.

- Raw text -


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