-# $OpenBSD: Httpd.pm,v 1.3 2018/05/19 13:57:43 jsing Exp $
+# $OpenBSD: Httpd.pm,v 1.4 2021/10/05 17:40:08 anton Exp $
# Copyright (c) 2010-2015 Alexander Bluhm <bluhm@openbsd.org>
# Copyright (c) 2015 Reyk Floeter <reyk@openbsd.org>
sub child {
my $self = shift;
- my @sudo = $ENV{SUDO} ? $ENV{SUDO} : ();
+ my @sudo = $ENV{SUDO} ? split(' ', $ENV{SUDO}) : ();
my @ktrace = $ENV{KTRACE} ? ($ENV{KTRACE}, "-i") : ();
my $httpd = $ENV{HTTPD} ? $ENV{HTTPD} : "httpd";
my @cmd = (@sudo, @ktrace, $httpd, "-dvv", "-f", $self->{conffile});
-# $OpenBSD: Makefile,v 1.13 2020/12/17 00:51:13 bluhm Exp $
+# $OpenBSD: Makefile,v 1.14 2021/10/05 17:40:08 anton Exp $
# The following ports must be installed for the regression tests:
# p5-IO-Socket-INET6 object interface for AF_INET and AF_INET6 domain sockets
.for a in ${ARGS}
REGRESS_TARGETS += run-$a
+REGRESS_ROOT_TARGETS += run-$a
run-$a: $a ${HTDOCS_MD5}
- time SUDO=${SUDO} KTRACE=${KTRACE} HTTPD=${HTTPD} perl ${PERLINC} ${PERLPATH}httpd.pl ${.OBJDIR} ${PERLPATH}$a
+ time SUDO="${SUDO}" KTRACE=${KTRACE} HTTPD=${HTTPD} perl ${PERLINC} ${PERLPATH}httpd.pl ${.OBJDIR} ${PERLPATH}$a
.endfor
# populate htdocs
-# $OpenBSD: Proc.pm,v 1.2 2016/05/03 19:13:04 bluhm Exp $
+# $OpenBSD: Proc.pm,v 1.3 2021/10/05 17:40:08 anton Exp $
# Copyright (c) 2010-2014 Alexander Bluhm <bluhm@openbsd.org>
#
push @perms, $pid;
}
}
- if (my $sudo = $ENV{SUDO} and @perms) {
+ if (my @sudo = split(' ', $ENV{SUDO}) and @perms) {
local $?; # do not modify during END block
- my @cmd = ($sudo, '/bin/kill', '-TERM', @perms);
+ my @cmd = (@sudo, '/bin/kill', '-TERM', @perms);
system(@cmd);
}
delete @CHILDREN{@pids};