X-Spam-Check-By: sourceware.org From: ib AT wupperonline DOT de (Ingo Brueckl) Date: Thu, 29 Dec 2005 03:11:00 +0100 Subject: COMSPEC environment variable missing Message-ID: <43b345c3@wupperonline.de> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=iso-8859-1 To: cygwin AT cygwin DOT com X-IsSubscribed: yes Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com Hi. I'm using the 20051227-snapshot of cygwin1.dll. This is my Windows 98SE environment as told by the 'set' command: TMP=C:\WINDOWS\TEMP TEMP=C:\WINDOWS\TEMP PROMPT=$p$g winbootdir=C:\WINDOWS PATH=C:\WINDOWS;C:\WINDOWS\COMMAND COMSPEC=C:\WINDOWS\COMMAND.COM DIRCMD=/o:gne windir=C:\WINDOWS BLASTER=A220 I5 D1 H5 P330 T6 CMDLINE=myset In a cygwin program, there is no COMSPEC environment variable. I get NULL when using getenv(). In order to check my cygwin environment, I wrote the following program: #include #include int main() { int i; for(i = 0;; i++) if (environ[i]) puts(environ[i]); else break; return 0; } which returns: !C:=C:\WINDOWS\TEMP TMP=/tmp TEMP=/tmp PROMPT=$p$g WINBOOTDIR=C:\WINDOWS PATH=/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/COMMAND DIRCMD=/o:gne WINDIR=C:\WINDOWS BLASTER=A220 I5 D1 H5 P330 T6 CMDLINE=myset PATH=/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/COMMAND TERM=cygwin HOME=/home/ib Indeed, COMSPEC is missing, and PATH is twice. A bug? Ingo -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Problem reports: http://cygwin.com/problems.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/