Class Signals

java.lang.Object
org.jline.utils.Signals

public final class Signals extends Object
Signal handling utilities for terminal applications.

The Signals class provides utilities for registering and handling system signals in a platform-independent way. It allows terminal applications to respond to signals such as SIGINT (Ctrl+C), SIGTSTP (Ctrl+Z), and others, without having to use platform-specific code.

This class uses reflection to access the underlying signal handling mechanisms of the JVM, which may vary depending on the platform and JVM implementation. It provides a consistent API for signal handling across different environments.

Signal handling is particularly important for terminal applications that need to respond to user interrupts or that need to perform cleanup operations when the application is terminated.

Since:
3.0