Package org.kiwiproject.base.process
Enum Class KillSignal
- All Implemented Interfaces:
Serializable,Comparable<KillSignal>,Constable
A few common (Unix/Linux/etc) kill signals.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionnumber()static KillSignalReturns the enum constant of this class with the specified name.static KillSignal[]values()Returns an array containing the constants of this enum class, in the order they are declared.Return this signal's number with a leading dash, e.g. "-3".static StringwithLeadingDash(String signal) Given a signal, prepend a leading dash if necessary, e.g. change "9" into "-9".
-
Enum Constant Details
-
SIGHUP
Hang up signal, e.g.kill -1 -
SIGINT
Interrupt signal, e.g.kill -2 -
SIGQUIT
Quit signal, e.g.kill -3 -
SIGKILL
Non-catchable, non-ignorable kill signal, e.g.kill -9 -
SIGTERM
Software termination signal, e.g.kill -15
-
-
Field Details
-
signalNumber
public final int signalNumber
-
-
Method Details
-
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
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 nameNullPointerException- if the argument is null
-
number
- Returns:
- the number associated with this signal.
-
withLeadingDash
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
Return this signal's number with a leading dash, e.g. "-3".- Returns:
- this instance of signal's number with a leading dash
-