[crac] RFR: PID adjustment on checkpoint [v3]
Roman Marchenko
rmarchenko at openjdk.org
Wed Jun 21 14:06:39 UTC 2023
On Wed, 21 Jun 2023 13:10:37 GMT, Anton Kozlov <akozlov 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 344:
>
>> 342: // by creating the main process waiting for children before exit.
>> 343: g_child_pid = fork();
>> 344: if (0 < g_child_pid) {
>
> Does it make sense to check if `g_child_pid < crac_min_pid`? As the ns_last_pid is a subject for races, and instead of guessing what the next pid will be, we'll have the ability to explicity check if the child has the right pid. The child will have to compare its pid with the expected crac_min_pid.
I'm not sure I understand your thoughts. Could you explain what do you mean, please?
`if (0 < g_child_pid)` here is just a detector for child/parent code to execute, nothing more. At this line, there is no need for child to check its PID.
-------------
PR Review Comment: https://git.openjdk.org/crac/pull/86#discussion_r1237060402
More information about the crac-dev
mailing list