[crac] RFR: Environment vars propagation into restored process [v3]
Dan Heidinga
heidinga at openjdk.org
Tue Oct 18 13:43:38 UTC 2022
On Mon, 3 Oct 2022 08:21:56 GMT, Roman Marchenko <duke at openjdk.org> wrote:
>> This PR provides functionality to propagate actual environment variables to a restored process, as well as the test for this functionality.
>>
>> Env propagation is done in few steps:
>> - Store the actual environment before restoring
>> - After restoring, replace the restored `environ` with a new one.
>> - On `afterRestore` event, propagate the new environment into a restored process via `ProcessEnvironment`.
>
> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision:
>
> Fixing review comments
Is there any interest in working together on a document that outlines the overall approach to these kinds of issues in CRaC? I can see we'll have a similar discussion when we start updating "-D" system properties on restore, when we want to deal with addressing time deltas (System.nanoTime vs System.currentTimeInMillis) and other areas.
Working on some overall principles on how CRaC should operate will help us be consistent in the approach we take and ensure we have a solid foundation to reason about each change. It'll also help us to identify and remember design constraints like debug-ability, service-ability, performance and, of course, useability.
I don't want to block this PR on such an effort, but I think we'd greatly benefit from such a document before users start trying CRaC in anger.
-------------
PR: https://git.openjdk.org/crac/pull/30
More information about the crac-dev
mailing list