RFR: 8295125: os::signal should be os specific

Kim Barrett kbarrett at openjdk.org
Mon Oct 24 03:53:58 UTC 2022


On Fri, 21 Oct 2022 02:59:22 GMT, David Holmes <dholmes at openjdk.org> wrote:

>> src/hotspot/os/posix/signals_posix.cpp line 877:
>> 
>>> 875: // - sigAct: the new struct sigaction to be filled in and used
>>> 876: //           for this signal. The caller must provide this as it
>>> 877: //           may need to be stored/accessed by that caller.
>> 
>> Maybe I missed something, but I didn't find any places where the caller needs sigAct.
>
> It is in `set_signal_handlers`:
> 
> struct sigaction sigAct;
>   int ret = PosixSignals::install_sigaction_signal_handler(&sigAct, &oldAct,
>                                                            sig, javaSignalHandler);
>   assert(ret == 0, "check");
>   // Save handler setup for possible later checking
>   vm_handlers.set(sig, &sigAct);
> 
> and is the reason I pass it in.

Yes, I missed that.

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

PR: https://git.openjdk.org/jdk/pull/10780


More information about the hotspot-runtime-dev mailing list