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

Issues with our POSIX set_signal_handler()

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • 16
    • hotspot
    • b03

      Here are the issues with current os::Bsd::set_signal_handler()

      #1 According to https://pubs.opengroup.org/onlinepubs/009695399/functions/sigaction.html "The storage occupied by sa_handler and sa_sigaction may overlap, and a conforming application shall not use both simultaneously.", however, our code assumes they use different storages, which just happens to work on BSD/Linux right now

      #2 The "bool set_installed" in the API is unused and can/should be removed

      #3 We should be reusing existing methods, such as "set_our_sigflags()" instead of repeating the same code

      #4 Comments could use cleanup and be expanded for those not familiar with details of signals

      #5 Not directly related, but we could add assert to check whether we re-set the same signal

            gziemski Gerard Ziemski
            gziemski Gerard Ziemski
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: