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

Roman Marchenko rmarchenko at openjdk.org
Thu Jun 22 13:53:41 UTC 2023


On Wed, 21 Jun 2023 13:11:44 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 194:
> 
>> 192:         return;
>> 193:     }
>> 194:     if (0 > fprintf(last_pid_file, "%d", pid)) {
> 
> Honestly I'd prefer write() to fprintf, to eliminate any possibility of buffering to write partial value to the kernel-exposed file.

It seems like I've just met a case when `fprintf` returns ok (i.e. the correct number of bytes written), but the file content isn't changed. `strace`'ing shows that underlying `write` call returns `EPERM`, which probably wasn't forward to a caller.

-------------

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


More information about the crac-dev mailing list