Mail Archives: cygwin/2006/01/19/10:29:11
On Wed, 18 Jan 2006, Jeff Hardy wrote:
> I have updated my windowsxp with the latest cygwin and
> this breaks several scripts I have that use the run
> command to start xterms without consoles. I have tried
> to track the problem down and at least one problem is
> that if I type "run env > /tmp/xxx" and look at
> /tmp/xxx, most of my environment variables are
> missing. Also, my HOME environment variable is now "/"
> instead of what my home directory is. I have another
> computer that I have not updated yet and when I do the
> same exercise as above, all the environment variables
> come across the run command.
>
> Anybody have any suggestions?
Just a few comments.
Run uses the Windows CreateProcess call to hide the console and
launch a new process, thereby subverting Cygwin in a manner similar to
one of our applications that I mentioned here:
http://cygwin.com/ml/cygwin/2006-01/msg00472.html
It passes a NULL for the lpEnvironment parameter of that call which
means to inherit the environment from the parent process. In Cygwin <=
1.5.18, this inheritance included Cygwin environment variables. Now it
does not. I presume it now only inherits what was in the Windows
environment?
Anyway, this is a regression, but not necessarily one that will be fixed,
especially given Igor's workaround. I suspect this is just a case of if
you subvert Cygwin's means of doing something using Windows native calls,
you can expect the subversion method to break occasionally :-(.
--
Brian Ford
Lead Realtime Software Engineer
VITAL - Visual Simulation Systems
FlightSafety International
the best safety device in any aircraft is a well-trained pilot...
--
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/
- Raw text -