From: espie Date: Sun, 2 Jul 2023 13:33:10 +0000 (+0000) Subject: lost silence_children behavior by accident X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9cb26fd53e9c5600c2f38ca940e1c400d9a2516e;p=openbsd lost silence_children behavior by accident add a hook to compute the exit_code in more fun ways --- diff --git a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm index d4b67feb120..ef6fbdda081 100644 --- a/usr.sbin/pkg_add/OpenBSD/AddDelete.pm +++ b/usr.sbin/pkg_add/OpenBSD/AddDelete.pm @@ -1,5 +1,5 @@ # ex:ts=8 sw=4: -# $OpenBSD: AddDelete.pm,v 1.99 2023/06/13 09:07:17 espie Exp $ +# $OpenBSD: AddDelete.pm,v 1.100 2023/07/02 13:33:10 espie Exp $ # # Copyright (c) 2007-2010 Marc Espie # @@ -139,7 +139,6 @@ sub parse_and_run($self, $cmd) my $NOKERNINFO = 0x02000000; # not defined in POSIX $termios->setlflag($lflag | $NOKERNINFO); $termios->setattr; - } } @@ -150,12 +149,18 @@ sub parse_and_run($self, $cmd) $termios->setattr; } + return $self->exit_code($state); +} + +sub exit_code($self, $state) +{ return $state->{bad} != 0; } # $self->silence_children($state) sub silence_children($, $) { + 1; } # nothing to do