[crac] RFR: PID adjustment on checkpoint [v3]

Roman Marchenko rmarchenko at openjdk.org
Wed Jun 21 11:46:32 UTC 2023

On Wed, 21 Jun 2023 08:19:58 GMT, Radim Vansa <rvansa at openjdk.org> wrote:

>> Roman Marchenko has updated the pull request incrementally with one additional commit since the last revision:
>>   Disabling the test for non-linux platforms
> src/java.base/share/native/launcher/main.c line 326:
>> 324:     if (is_checkpoint) {
>> 325:         const int crac_min_pid_default = 128;
>> 326:         const char *env_min_pid_str = getenv("CRAC_MIN_PID");
> Why using an environment variable rather than JVM option? Env vars cannot be 'listed', so the user can't know about them without finding a specific place in documentation.

This is because of PID adjustment  happens before JVM inits, so to use JVM option we need to have JVM option parsing implemented in main.c (at least for one option), more complicated than it was done in parse_checkpoint(). That is why I've decided to use env var instead. OTOH maybe it worth considering moving PID adjustment & forking implementation to java.c, closer to JVM_Init call.


PR Review Comment: https://git.openjdk.org/crac/pull/86#discussion_r1236864745

More information about the crac-dev mailing list