From 034526c3afcd49ab5bff3de903ef4f800d3d875f Mon Sep 17 00:00:00 2001 From: Marc Espie Date: Mon, 11 Mar 2019 16:31:25 +0000 Subject: perl has a warning for statements following exec. It doesn't trigger for die or exit, but *only* if those are the CORE operations. make State silent in a context that overrides exit (say, DBI) by using exec ... or exit instead (using CORE::exit would be worse, since we want to keep the override) --- 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 83b5923cbc8..0c8c73e86ee 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.54 2018/08/03 06:37:08 espie Exp $ +# $OpenBSD: State.pm,v 1.55 2019/03/11 16:31:24 espie Exp $ # # Copyright (c) 2007-2014 Marc Espie # @@ -472,8 +472,8 @@ sub _system return 1; } elsif ($r == 0) { &$todo; - exec {$_[0]} @_; - exit 1; + exec {$_[0]} @_ or + exit 1; } else { &$todo2; waitpid($r, 0); -- cgit v1.2.3