RFR: JDK-8262955: Unify os::fork_and_exec() across Posix platforms [v3]

Thomas Stuefe stuefe at openjdk.java.net
Mon Mar 8 06:12:12 UTC 2021


On Mon, 8 Mar 2021 05:37:37 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> Thomas Stuefe has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   tidy up
>
> src/hotspot/share/runtime/thread.hpp line 826:
> 
>> 824:   static void SpinRelease(volatile int * Lock);
>> 825: 
>> 826: #ifdef POSIX
> 
> I hate seeing this in shared code. It really belongs in platform-dependent thread code - but osThread_posix doesn't exist. :(
> 
> But do we need this - can't the existing use_vfork_if_available parameter instead be renamed and interpreted as not_in_a_signal_handler?

But would having this functionality not make sense? We always argue about what is and is not allowed during signal handling; here, we may get a mechanism to actually assert it and e.g. prevent using malloc() or logging or whatever VM functionality may creep in.

But I will revert my last commit completely and re-add the needs-vfork parameter. This was supposed to be mainly a cleanup; maybe it was wrong to mix in behavioral changes.

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

PR: https://git.openjdk.java.net/jdk/pull/2810


More information about the hotspot-dev mailing list