On Fri, 14 Jan 2022 19:09:53 GMT, Phil Race <p...@openjdk.org> wrote:

> Some more signal handler related warning strings from the VM need to be 
> excluded from what this test considers a failure 
> 
> See the bug for more info.

In hotspot, we want to explicitly ignore SIGPIPE and SIGXFSZ (see 
https://bugs.openjdk.java.net/browse/JDK-4229104 and 
https://bugs.openjdk.java.net/browse/JDK-6499219). But we don't do SIG_IGN, 
since we still need to give chained handlers the opportunity to handle them. 
See 
https://github.com/openjdk/jdk/blob/fef8f2d30004ea75c663752ae6c61b214fb8abc8/src/hotspot/os/posix/signals_posix.cpp#L618-L623.

So now, from the OS perspective, we handle SIGPIPE. We just don't do anything 
but return from the signal handler (ignoring chained handlers for now). If 
someone outside sets SIGPIPE to SIG_IGN, then we get subtle changes:
- IO calls would now yield EPIPE, whereas now I am not sure what happens? Does 
the IO call report success?
- Also, chained handlers would not get called.

It's all pretty unexciting. Nothing would crash. There may be an argument for 
skipping the test on SIGPIPE if it is SIG_IGN and we don't have chained 
handlers. If it seems such a standard thing to do for third party libraries. 
Idk. Maybe open a separate bug?

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

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

Reply via email to