Abort transaction on SIGINT
This commit is contained in:
parent
5d37f7af5b
commit
9f905b84d5
2 changed files with 15 additions and 1 deletions
|
@ -2,4 +2,11 @@
|
|||
|
||||
sub command { NEXT }
|
||||
|
||||
$SIG{INT} = 'IGNORE';
|
||||
$SIG{INT} = sub {
|
||||
$::ABORT_HACK = "^C";
|
||||
|
||||
# DO NOT USE this global variable. It's a nasty hack. In most cases,
|
||||
# you should "return ABORT" instead, or maybe "main::abort()" when doing
|
||||
# nastier stuff. You should only need $::ABORT_HACK in signal handlers.
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue