On Fri, 21 Jan 2022 09:52:22 GMT, Thomas Stuefe <stu...@openjdk.org> wrote:
>> Hi Xin, >> Signal chaining doesn't work for BREAK_SIGNAL - from the signal chaining >> docs: >> >> >> Note: >> >> The SIGQUIT, SIGTERM, SIGINT, and SIGHUP signals cannot be chained. If the >> application must >> handle these signals, then consider using the —Xrs option. > > Exactly. If embedding application likes to handle SIGQUIT, it needs to set > -Xrs. In that case, it does not matter if it installed the signal handler > before or after VM was initialized. We just won't touch SIGQUIT at all in > that case. > > Wrt the position of handling the break signal: most of the coding between > lines 564 and 588 does not hurt; `PosixSignals::unblock_error_signals();` may > actually be beneficial, though it is highly unlikely that we get problems > with secondary crashes when handling SIGQUIT. So, line 588 would be an okay > position for SIGQUIT handling too. I just didn't see the point in doing that extra stuff or the signal_is_handled when we just need to bail out immediately. ------------- PR: https://git.openjdk.java.net/jdk/pull/7003