delorie.com/archives/browse.cgi | search |
X-Spam-Check-By: | sourceware.org |
Date: | Fri, 30 Dec 2005 23:36:50 -0500 |
From: | Christopher Faylor <cgf-no-personal-reply-please AT cygwin DOT com> |
To: | cygwin AT cygwin DOT com |
Subject: | Re: COMSPEC environment variable missing |
Message-ID: | <20051231043650.GB2322@trixie.casa.cgf.cx> |
Reply-To: | cygwin AT cygwin DOT com |
References: | <43b345c3 AT wupperonline DOT de> |
Mime-Version: | 1.0 |
In-Reply-To: | <43b345c3@wupperonline.de> |
User-Agent: | Mutt/1.5.11 |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT com> |
List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
List-Archive: | <http://sourceware.org/ml/cygwin/> |
List-Post: | <mailto:cygwin AT cygwin DOT com> |
List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/ml/#faqs> |
Sender: | cygwin-owner AT cygwin DOT com |
Mail-Followup-To: | cygwin AT cygwin DOT com |
Delivered-To: | mailing list cygwin AT cygwin DOT com |
On Thu, Dec 29, 2005 at 03:11:00AM +0100, Ingo Brueckl wrote: >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 <stdio.h> > #include <unistd.h> > > 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. PATH twice is a bug (but not a regression). I couldn't duplicate the missing COMSPEC. I only have WinME to try this on, though. cgf -- 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/
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |