summaryrefslogtreecommitdiff
path: root/usr.sbin
diff options
context:
space:
mode:
authorMarc Espie <espie@cvs.openbsd.org>2019-03-11 16:31:25 +0000
committerMarc Espie <espie@cvs.openbsd.org>2019-03-11 16:31:25 +0000
commit034526c3afcd49ab5bff3de903ef4f800d3d875f (patch)
tree1f27f07e55c96491bc173bf4d500922264cc98eb /usr.sbin
parent2861d678fe359287ddba81896d462f2a572b9b55 (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)
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/pkg_add/OpenBSD/State.pm6
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);