See mailing list discussion here: https://mail.openjdk.org/pipermail/core-libs-dev/2025-April/144077.html
bottomline:
If the JVM loads native code that resets a signal disposition to SIG_IGN, that gets inherited by child processes.
We see this in some FIPS-related libraries that are loaded as third-party JNI libraries by the JVM, and that set SIG_PIPE to SIG_IGN, which then gets inherited by child processes.
Reproduce:
- write an agent lib that sets SIGPIPE to SIG_IGN
- start java with this agentlib; start a program that spawns a process using Runtime.exec or ProcessBuilder
- the spawned process now inherits SIG_IGN
What should happen: The JVM should reset the signal dispositions for SIGPIPE.
(Note that this is actually a problem for all signals, not just SIGPIPE)
bottomline:
If the JVM loads native code that resets a signal disposition to SIG_IGN, that gets inherited by child processes.
We see this in some FIPS-related libraries that are loaded as third-party JNI libraries by the JVM, and that set SIG_PIPE to SIG_IGN, which then gets inherited by child processes.
Reproduce:
- write an agent lib that sets SIGPIPE to SIG_IGN
- start java with this agentlib; start a program that spawns a process using Runtime.exec or ProcessBuilder
- the spawned process now inherits SIG_IGN
What should happen: The JVM should reset the signal dispositions for SIGPIPE.
(Note that this is actually a problem for all signals, not just SIGPIPE)
- relates to
-
JDK-8357683 (process) SIGQUIT still blocked after JDK-8234262 with jdk.lang.Process.launchMechanism=FORK or VFORK
-
- Resolved
-
-
JDK-8357100 Add tracing to analyze child process launches
-
- New
-