diff options
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/pkg_delete | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_delete b/usr.sbin/pkg_add/pkg_delete index e39c624ae0a..ebedd89e4e9 100644 --- a/usr.sbin/pkg_add/pkg_delete +++ b/usr.sbin/pkg_add/pkg_delete @@ -1,6 +1,6 @@ #!/usr/bin/perl # ex:ts=8 sw=4: -# $OpenBSD: pkg_delete,v 1.113 2008/03/08 12:07:45 espie Exp $ +# $OpenBSD: pkg_delete,v 1.114 2009/11/03 09:57:27 espie Exp $ # # Copyright (c) 2003-2007 Marc Espie <espie@openbsd.org> # @@ -158,6 +158,13 @@ if ($bad) { exit(1); } +my $handler = sub { my $sig = shift; die "Caught SIG$sig"; }; +local $SIG{'INT'} = $handler; +local $SIG{'QUIT'} = $handler; +local $SIG{'HUP'} = $handler; +local $SIG{'KILL'} = $handler; +local $SIG{'TERM'} = $handler; + eval { # and finally, handle the removal { do { |