diff options
author | Marc Espie <espie@cvs.openbsd.org> | 2019-03-11 16:31:25 +0000 |
---|---|---|
committer | Marc Espie <espie@cvs.openbsd.org> | 2019-03-11 16:31:25 +0000 |
commit | 034526c3afcd49ab5bff3de903ef4f800d3d875f (patch) | |
tree | 1f27f07e55c96491bc173bf4d500922264cc98eb | |
parent | 2861d678fe359287ddba81896d462f2a572b9b55 (diff) |
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)
-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 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 <espie@openbsd.org> # @@ -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); |