Skip to content

Instantly share code, notes, and snippets.

@xtetsuji
Created January 18, 2016 08:07
Show Gist options
  • Save xtetsuji/7bba63ea26244765874f to your computer and use it in GitHub Desktop.
Save xtetsuji/7bba63ea26244765874f to your computer and use it in GitHub Desktop.
Show given signal.
#!/usr/bin/perl
use strict;
use warnings;
my @signals = map { uc } split /\s+/, qx{/bin/kill -l};
$SIG{$_} = sub {
my $signal = shift;
print "signal=$signal\n";
} for @signals;
sleep 30;
exit;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment