www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2003/01/29/09:24:20

Date: Wed, 29 Jan 2003 16:23:41 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
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: <v3flgkt0bfj19@corp.supernews.com>
Message-ID: <Pine.SUN.3.91.1030129162053.20453C-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 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 -


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