Mail Archives: djgpp/2003/01/29/00:52:43
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 -