See bug description. We now unblock all signals in both FORK and POSIX_SPAWN launch modes. This fixes the problem and makes the behavior consistent across these two modes.
I left the VFORK mode alone since I believe the signal state is still shared with the parent. One more reason to get rid of this mode soon (it's deprecated with 25 and will be removed with 26) The fix just moves the unblocking code from the jspawnhelper over to the child process function that is called for all three modes. ----- Testing: I did various manual tests. I also tested that test/jdk/java/lang/ProcessBuilder/UnblockSignals.java succeeds with both POSIX_SPAWN and FORK mode now and that the behavior is unchanged (still broken) for VFORK mode. ping @RogerRiggs I would like to get this still into JDK 25; the fix is small and clean enough to not worry me. ------------- Commit messages: - unblock signals in fork mode Changes: https://git.openjdk.org/jdk/pull/25428/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25428&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8357683 Stats: 30 lines in 3 files changed: 20 ins; 6 del; 4 mod Patch: https://git.openjdk.org/jdk/pull/25428.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/25428/head:pull/25428 PR: https://git.openjdk.org/jdk/pull/25428