Mail Archives: djgpp/2003/01/29/09:24:20
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.
- Raw text -