Skip to content

Instantly share code, notes, and snippets.

@kamipo
Created February 26, 2009 09:54
Show Gist options
  • Save kamipo/70769 to your computer and use it in GitHub Desktop.
Save kamipo/70769 to your computer and use it in GitHub Desktop.
#!/usr/bin/perl
use strict;
use warnings;
for my $s (qw/TERM HUP INT/) {
$SIG{$s} = sub { warn "SIG$s !!\n" and exit };
}
chomp, print $_."\n" while <STDIN>;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment