diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2019-12-04 10:45:20 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2019-12-04 10:45:20 +0000 |
commit | 79ef0d7d2a8db40368d7ce93da6c4ee02cd4ce03 (patch) | |
tree | daef3b1e8a02047ffe29113feb501de716fe955b /usr.sbin | |
parent | 6848daddaf9f55d9ca8eb0aec0360a5351c2b7c2 (diff) |
allow error to be passed along, in case we need to save $? for later
Diffstat (limited to 'usr.sbin')
-rw-r--r-- | usr.sbin/pkg_add/OpenBSD/State.pm | 6 |
1 files changed, 3 insertions, 3 deletions
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 <espie@openbsd.org> # @@ -437,8 +437,8 @@ sub find_signal sub child_error { - my $self = shift; - my $error = $?; + my ($self, $error) = @_; + $error //= $?; my $extra = ""; |