new blood

Brian Dessent
Sun May 1 00:15:00 GMT 2005

Christopher Faylor wrote:

> 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?

Yep, I'd thought of that too.  It still requires the helper app, though, which is
the part I was unsure of.  Should the testcase generate the helper app on the fly
by calling gcc, or is possible for one test to refer to another in the test
harness?  If so I could have the helper app just be another testcase file, that
just returns success if it detects that it wasn't called from the environ tester.

Alternatively, could the testcase exec() itself as the child process, and pass
something in the arguments (or perhaps a different argv[0]) to indicate this?  It
could then determine if it's being invoked as the testcase or as the helper.

> 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.

Okay, so compare the win32 value of PATH in both and make sure it's inherited.  And
if the parent has cleared its PATH (or uses execve() without PATH set in envp) then
the child is to have no PATH, correct?


More information about the Cygwin-developers mailing list