Enum Class Terminal.Signal

java.lang.Object
java.lang.Enum<Terminal.Signal>
org.jline.terminal.Terminal.Signal
All Implemented Interfaces:
Serializable, Comparable<Terminal.Signal>, Constable
Enclosing interface:
Terminal

public static enum Terminal.Signal extends Enum<Terminal.Signal>
Types of signals that can be handled by terminal applications.

Signals represent asynchronous notifications that can be sent to the application in response to certain events or user actions. Each signal type corresponds to a specific event or key combination:

  • INT - Interrupt signal (typically Ctrl+C)
  • QUIT - Quit signal (typically Ctrl+\)
  • TSTP - Terminal stop signal (typically Ctrl+Z)
  • CONT - Continue signal (sent when resuming after TSTP)
  • INFO - Information signal (typically Ctrl+T on BSD systems)
  • WINCH - Window change signal (sent when terminal size changes)

Note that signal handling behavior may vary across different platforms and terminal implementations. Some signals may not be available or may behave differently on certain systems.

See Also:
  • Enum Constant Details

    • INT

      public static final Terminal.Signal INT
      Interrupt signal, typically generated by pressing Ctrl+C. Used to interrupt or terminate a running process.
    • QUIT

      public static final Terminal.Signal QUIT
      Quit signal, typically generated by pressing Ctrl+\. Often used to force a core dump or immediate termination. Note: The JVM does not easily allow catching this signal natively.
    • TSTP

      public static final Terminal.Signal TSTP
      Terminal stop signal, typically generated by pressing Ctrl+Z. Used to suspend the current process.
    • CONT

      public static final Terminal.Signal CONT
      Continue signal, sent when resuming a process after suspension. This signal is sent to a process when it's resumed after being stopped by TSTP.
    • INFO

      public static final Terminal.Signal INFO
      Information signal, typically generated by pressing Ctrl+T on BSD systems. Used to request status information from a running process.
    • WINCH

      public static final Terminal.Signal WINCH
      Window change signal, sent when the terminal window size changes. Applications can handle this signal to adjust their display accordingly.
  • Method Details

    • values

      public static Terminal.Signal[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static Terminal.Signal valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null