RFR: 8252324: Signal related code should be shared among POSIX platforms

Thomas Stuefe stuefe at openjdk.java.net
Tue Oct 6 06:06:42 UTC 2020


On Mon, 5 Oct 2020 19:23:21 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

>> This is a fresh start for https://github.com/openjdk/jdk/pull/157
>> 
>> Please review this change that refactors common POSIX code into a separate
>> file.
>> 
>> Currently there appears to be quite a bit of duplicated code among POSIX
>> platforms, which makes it difficult to apply single fix to the signal code.
>> With this fix, we will only need to touch single file for common POSIX
>> code fixes from now on.
>> 
>> ---------
>> ### Progress
>> - [x] Change must not contain extraneous whitespace
>> - [x] Commit message must refer to an issue
>> - [ ] Change must be properly reviewed
>> 
>> 
>> 
>> ### Download
>> `$ git fetch https://git.openjdk.java.net/jdk pull/497/head:pull/497`
>> `$ git checkout pull/497`
>
> src/hotspot/os/aix/os_aix.cpp line 1459:
> 
>> 1457:   // that will interfere with OOM killling.
>> 1458:   PosixSignals::print_signal_handler(st, SIGDANGER, buf, buflen);
>> 1459: }
> 
> I wonder with some #ifdefs, this could also be moved to posix_signals.cpp.   Not for this change but maybe a follow-up
> RFE.

Yes, this os::print_signal_handlers()  and os::print_signal_handler() could be unified across Posix platforms. At least
the latter.

(Personally I also would like to print all signal handlers from 1..<smallest non-realtime>, regardless of whether its
one of "us". E.g. if process overrides SIGCHILD that is interesting too.)

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

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


More information about the hotspot-runtime-dev mailing list