From 79ef0d7d2a8db40368d7ce93da6c4ee02cd4ce03 Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Wed, 4 Dec 2019 10:45:20 +0000 Subject: allow error to be passed along, in case we need to save $? for later --- usr.sbin/pkg_add/OpenBSD/State.pm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'usr.sbin') diff --git a/usr.sbin/pkg_add/OpenBSD/State.pm b/usr.sbin/pkg_add/OpenBSD/State.pm index b89c2f4adf2..c38ffa38dc4 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.62 2019/07/24 18:05:26 espie Exp $ +# $OpenBSD: State.pm,v 1.63 2019/12/04 10:45:19 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -437,8 +437,8 @@ sub find_signal sub child_error { - my $self = shift; - my $error = $?; + my ($self, $error) = @_; + $error //= $?; my $extra = ""; -- cgit v1.2.3