Misbehaving exit status from Hotspot
Florian Weimer
fweimer at redhat.com
Fri Jun 29 09:50:41 UTC 2018
On 06/29/2018 01:51 AM, David Holmes wrote:
> To be clear, I think the libc advise on this topic is just wrong-headed:
>
> https://www.gnu.org/software/libc/manual/html_node/Termination-Signals.html
>
> "Such a handler should end by specifying the default action for the
> signal that happened and then reraising it; this will cause the program
> to terminate with that signal, as if it had not had a handler."
>
> It's not even self-consistent because it states this for the
> "termination signals" but when caught some of these signals
> intentionally do not trigger termination. So following that advice for
> SIGQUIT would be completely wrong for the JVM!
The advice seems appropriate to me for handlers that lead to
termination, as generally intended for these signals. SIGQUIT doesn't
do that for the JVM, so the advice doesn't apply. SIGTERM appears to do
so. So why not preserve in the information that the process was shut
down by SIGTERM by reraising the signal? This might confer useful
information to the caller.
Thanks,
Florian
More information about the hotspot-runtime-dev
mailing list