Date: Wed, 29 Jan 2003 07:47:44 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: Charles Sandmann 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: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 Precedence: bulk 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.