Signals and the kill function
- $SIG
- %SIG
- kill
List of signals on Linux: man -S 7 signal
To send a signal use kill SIG, LIST
(process IDs)
For example: kill 9, $pid;
use strict;
use warnings;
my ($sig, @process) = @ARGV;
die "Usage: $0 SIGNAL PROCESS-ID\n" if not @process;
kill $sig, @process;