At 4:28 PM -0600 11/25/07, John E. Malmberg wrote: >Ken Williams wrote: >>Regarding the second patch, it seems like we should find a way to make the >>test actually happen on VMS; the point of the test is to make sure we don't >>muddle with %ENV, something it would seem like we should be doubly vigilant >>on VMS about. >> >>Is it permissible on VMS for us to at least check that the actual keys of >>%ENV haven't changed before & after the call? > >Not really. >
Let me try to summarize what's relevant to the question at hand from John's detailed explanation. ISTR we only implement C<local %ENV> on a one-at-a-time basis. Creating the ability to do a list assignment to it is on the to-do list but it basically means taking a copy of all of %ENV and then discarding the entire hash at the end of the dynamic scope. For reasons John outlined, the traditional save-and-restore approach is not directly translatable. To get back to Ken's question, it is safe to take a copy of C<keys %ENV>. You can then do stuff, take another copy and compare. You won't harm the environment. However, there is a chance of a race condition because some other process could create or delete keys from %ENV in the interim. I'm surprised that is OS-specific. I know Windows has both system-level and process-level environment variables. On the other hand, the window during which the test is running may be too small for this really to be anything worth worrying about. -- ________________________________________ Craig A. Berry mailto:[EMAIL PROTECTED] "... getting out of a sonnet is much more difficult than getting in." Brad Leithauser