Signal
Represents supported POSIX signals exposed by the public API.
Description
This enumeration provides a strongly-typed abstraction over common POSIX signals used for process control and inter-process communication.
Each case MUST map directly to its corresponding POSIX signal number. Consumers MAY use this enum to improve readability and type safety when sending or handling signals.
Implementations interacting with system-level process control SHOULD rely on these values to ensure consistency across environments.
Cases
Alarm clock signal (SIGALRM).
Child status changed signal (SIGCHLD).
Continue-if-stopped signal (SIGCONT).
Terminal line hangup signal (SIGHUP).
Interactive interrupt signal (SIGINT).
Uncatchable termination signal (SIGKILL).
Broken pipe signal (SIGPIPE).
Interactive quit signal (SIGQUIT).
Process stop signal (SIGSTOP).
Terminal stop signal (SIGTSTP).
Graceful termination signal (SIGTERM).
User-defined application signal 1 (SIGUSR1).
User-defined application signal 2 (SIGUSR2).
Methods
Returns the conventional shell exit status derived from this signal.
Terminal line hangup signal (SIGHUP).
Description
This signal is typically sent when a controlling terminal is closed.
Interactive interrupt signal (SIGINT).
Description
This signal is usually triggered by user interaction (e.g., Ctrl+C).
Interactive quit signal (SIGQUIT).
Description
This signal MAY trigger a core dump depending on the environment.
Uncatchable termination signal (SIGKILL).
Description
This signal MUST NOT be caught, blocked, or ignored by the process.
User-defined application signal 1 (SIGUSR1).
Description
This signal MAY be used for custom application-level communication.
User-defined application signal 2 (SIGUSR2).
Description
This signal MAY be used for custom application-level communication.
Broken pipe signal (SIGPIPE).
Description
This signal is raised when writing to a pipe with no readers.
Alarm clock signal (SIGALRM).
Description
This signal is typically used for timer-based interruptions.
Graceful termination signal (SIGTERM).
Description
This signal SHOULD be used to request a controlled shutdown.
Child status changed signal (SIGCHLD).
Description
This signal is sent to a parent process when a child process changes state.
Continue-if-stopped signal (SIGCONT).
Description
This signal resumes a previously stopped process.
Process stop signal (SIGSTOP).
Description
This signal MUST stop the process and MUST NOT be caught or ignored.
Terminal stop signal (SIGTSTP).
Description
This signal is typically triggered by user interaction (e.g., Ctrl+Z).
Returns the conventional shell exit status derived from this signal.
public
exitStatus() : int
Description
According to POSIX conventions, when a process is terminated by a signal, the exit status SHOULD be reported as 128 plus the signal number.
Return values
Description
the computed exit status