Date: Wed, 29 Jan 2003 16:23:41 +0200 (IST) From: Eli Zaretskii X-Sender: eliz AT is To: 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: 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 Wed, 29 Jan 2003, Peter S Tillier wrote: > A further experiment, prompted by a posting in > comp.lang.awk (where this all started out) by Andrew > Graham gives this odd looking result: > > c:\>ver > > Microsoft Windows 2000 [Version 5.00.2195] > > c:\>echo %COMSPEC% > C:\WINNT\system32\cmd.exe > > c:\>gawk "BEGIN{print ENVIRON[\"COMSPEC\"]}" > C:\WINNT\SYSTEM32\COMMAND.COM > > c:\> > > i.e., despite ver and echo %COMSPEC% saying that > we're using cmd.exe, DJGPP gawk's ENVIRON array > thinks that we're using COMMAND.COM This is not odd at all: all Windows versions of the NT family do special tricks so that DOS programs have COMMAND.COM as their COMSPEC's value. Windows does that on purpose; there's almost nothing a DJGPP program can do to work around this. > Is it possible that there's a bug in DJGPP libc's > system() call? It's possible, but the fact that COMMAND.COM appears in your test script is not an evidence to any bug in DJGPP; it's just what Windows does to us.