Skip to content

Instantly share code, notes, and snippets.

@gfx
Created December 19, 2010 02:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gfx/747040 to your computer and use it in GitHub Desktop.
Save gfx/747040 to your computer and use it in GitHub Desktop.
#!perl
use strict;
use Scope::Guard;
$SIG{INT} = sub { exit 0 };
my $sg = Scope::Guard->new(sub { warn "hi"; sleep 10 });
print "Please send SIGINT\n";
exit 0;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment