Is this a known problem with getenv() ?

John Emmas johne53@tiscali.co.uk
Wed Sep 23 16:54:00 GMT 2009


----- Original Message ----- 
From: "John Emmas"
>
> I might just try experimenting with a very simple program and see if I
> still get the error
>
I partially tracked down the problem, although I don't quite know how to
solve it.  If I write this simple console app:-

#include <stdio.h>
#include <stdlib.h>

int main ()
{
   printf ( getenv ("PATH") );
   return 0;
}

it outputs the correct path.  However, if I create a GUI app and launch it
under 'X', the path seems to change and includes lots of duplicated folders.
I figured out that startxwin.bat is adding a few duplicated entries to my
path but that doesn't explain why there are so many duplications and I don't
know where the others might be coming from.  However, I don't get any
duplicates at all if I run XWin directly, instead of starting it with
startxwin.bat.

John


--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list