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

Ctrl+C does not call shutdown hooks after JLine upgrade

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 23
    • 23
    • tools
    • None
    • b23
    • 23
    • b26
    • linux

        JDK-8327476 broke handling of Ctrl+C. New version of JLine modifies SIGINT handler and therefore breaks normal processing of Ctrl+C.

        To provoke the issue, it's enough to call System.console().

        I attached SigIntTest.java that demonstrates the problem.
        Before commit 0a4eeeaa, the program printed "Shutdown hook called".
        Now, it immediately terminates upon pressing Ctrl+C or sending kill -2 to the process.

              jlahoda Jan Lahoda
              apangin Andrei Pangin
              Votes:
              0 Vote for this issue
              Watchers:
              7 Start watching this issue

                Created:
                Updated:
                Resolved: