Enum KillSignal

    • Enum Constant Detail

      • SIGHUP

        public static final KillSignal SIGHUP
        Hang up signal, e.g. kill -1
      • SIGINT

        public static final KillSignal SIGINT
        Interrupt signal, e.g. kill -2
      • SIGQUIT

        public static final KillSignal SIGQUIT
        Quit signal, e.g. kill -3
      • SIGKILL

        public static final KillSignal SIGKILL
        Non-catchable, non-ignorable kill signal, e.g. kill -9
      • SIGTERM

        public static final KillSignal SIGTERM
        Software termination signal, e.g. kill -15
    • Field Detail

      • signalNumber

        public final int signalNumber
    • Method Detail

      • values

        public static KillSignal[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (KillSignal c : KillSignal.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static KillSignal valueOf​(String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
        NullPointerException - if the argument is null
      • number

        public String number()
        Returns:
        the number associated with this signal.
      • withLeadingDash

        public static String withLeadingDash​(String signal)
        Given a signal, prepend a leading dash if necessary, e.g. change "9" into "-9".
        Parameters:
        signal - the signal to modify
        Returns:
        the possibly modified signal with a leading dash
      • withLeadingDash

        public String withLeadingDash()
        Return this signal's number with a leading dash, e.g. "-3".
        Returns:
        this instance of signal's number with a leading dash