summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--usr.sbin/pkg_add/pkg_add8
1 files changed, 7 insertions, 1 deletions
diff --git a/usr.sbin/pkg_add/pkg_add b/usr.sbin/pkg_add/pkg_add
index d4e784c85ac..646eaf71e0e 100644
--- a/usr.sbin/pkg_add/pkg_add
+++ b/usr.sbin/pkg_add/pkg_add
@@ -1,7 +1,7 @@
#! /usr/bin/perl
# ex:ts=8 sw=4:
-# $OpenBSD: pkg_add,v 1.364 2009/10/21 10:22:58 espie Exp $
+# $OpenBSD: pkg_add,v 1.365 2009/10/21 10:26:16 espie Exp $
#
# Copyright (c) 2003-2009 Marc Espie <espie@openbsd.org>
#
@@ -781,6 +781,12 @@ if ($bad) {
}
+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;
# This is the actual very small loop that adds all packages
eval {