diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2012-04-10 16:57:13 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2012-04-10 16:57:13 +0000 |
commit | e9e89e5ae05bfd8e83cfd22c0ac34bd8eaf0f448 (patch) | |
tree | 10b907388b55aae1565453ba85526d4e94c70c3c /usr.sbin/pkg_add/OpenBSD | |
parent | c6900fb1f3331136ab15d1da06a8a195e60ba369 (diff) |
prevent dpb trace handler from getting in the way of normal usage error reports.
Diffstat (limited to 'usr.sbin/pkg_add/OpenBSD')
-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"; } |