Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8359251

(process) Child processes inherit SIG_IGN for SIGPIPE from JVM

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Unresolved
    • Icon: P4 P4
    • None
    • 21, 24, 25, 26
    • core-libs
    • None

      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)





            stuefe Thomas Stuefe
            stuefe Thomas Stuefe
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: