diff options
author | 2012-04-10 16:57:12 +0000 | |
---|---|---|
committer | 2012-04-10 16:57:12 +0000 | |
commit | fa1d85994d05a4272273bef633f7193d8713177e (patch) | |
tree | bd7059e34ed6e35b92924a4bd9c1a6f6f214eda7 | |
parent | Do not pick the network number as alias on entries with no alias (diff) | |
download | wireguard-openbsd-fa1d85994d05a4272273bef633f7193d8713177e.tar.xz wireguard-openbsd-fa1d85994d05a4272273bef633f7193d8713177e.zip |
prevent dpb trace handler from getting in the way of normal usage error reports.
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/Getopt.pm | 3 | ||||
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/usr.sbin/pkg_add/OpenBSD/Getopt.pm b/usr.sbin/pkg_add/OpenBSD/Getopt.pm index fcca2bfba8d..2de3b1f1a11 100644 --- a/usr.sbin/pkg_add/OpenBSD/Getopt.pm +++ b/usr.sbin/pkg_add/OpenBSD/Getopt.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: Getopt.pm,v 1.11 2010/12/24 09:04:14 espie Exp $ +# $OpenBSD: Getopt.pm,v 1.12 2012/04/10 16:57:12 espie Exp $ # # Copyright (c) 2006 Marc Espie <espie@openbsd.org> # @@ -77,6 +77,7 @@ sub getopts($;$) } } } else { + delete $SIG{__DIE__}; die "Unknown option -$opt"; } } diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index 2f848eff898..18bb492876c 100644 --- a/usr.sbin/pkg_add/OpenBSD/State.pm +++ b/usr.sbin/pkg_add/OpenBSD/State.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: State.pm,v 1.21 2011/08/26 08:46:10 espie Exp $ +# $OpenBSD: State.pm,v 1.22 2012/04/10 16:57:12 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie <espie@openbsd.org> # @@ -237,6 +237,7 @@ sub _fatal my $self = shift; # implementation note: to print "fatal errors" elsewhere, # the way is to eval { croak @_}; and decide what to do with $@. + delete $SIG{__DIE__}; croak "Fatal error: ", @_, "\n"; } |