This is the mail archive of the cygwin-developers@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: new blood


On Sat, Apr 30, 2005 at 03:59:41AM -0700, Brian Dessent wrote:
>Christopher Faylor wrote:
>
>> A case in point is the SYSTEMROOT problem which was recently unearthed
>> in the cygwin list.  Corinna fixed it a while ago and then I broke it
>> again.  It would have been nice to have a test suite entry which detected
>> that.
>
>So, I got to looking into this.  It turns out that this is still broken, but only
>in the case where the process being spawned is mounted cygexec.

This should now be fixed.

>So, about that testcase...
>
>The 'cygexec' issue aside, I found it very hard to actually make a testcase that
>failed on 1.5.16 and passes on current CVS.  I think the reason for this was that
>the env.variable was being added to the Cygwin heap, but not being added to the
>win32 environment passed to CreateProcess().  The strace shows this difference of
>one:
>
>   30   19933 [main] environ 1808 build_env: env count 61, bytes 2890
>  140   20073 [main] environ 1808 build_env: envp 0x61811608, envc 62
>
>Writing a test case that would have found this bug is tough, because a Cygwin child
>process will see the variable, but a native child process looking at the win32
>environment would not find it -- and thus the socket calls would fail, too.

Couldn't you just write a helper app that calls both GetEnvironmentVariable
and getenv to make sure that SYSTEMROOT exist and are equal to each
other?

You'd also want to make sure that if the parent resets SYSTEMROOT, that
is what gets passed on -- not the derived value.

And, you'd want to check that PATH always exists in the child's windows
environment iff it exists in the parent and that the child/parent agree
on the value of PATH.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]