Interface Signals


public interface Signals
Instances of Signals provide the ability to register custom signal handlers, for example to ignore SIGINT and similar in a child process. Implementations should be registered and obtained via service loader.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    register(String signal, Runnable handler)
    Register a handler to execute when the VM receives the specified signal.
  • Method Details

    • register

      void register(String signal, Runnable handler)
      Register a handler to execute when the VM receives the specified signal.
      Parameters:
      signal - signal, such as "INT"
      handler - handler to run on signal