summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorGlenn Strauss <gstrauss@gluelogic.com>2023-04-19 17:59:01 -0400
committerGlenn Strauss <gstrauss@gluelogic.com>2023-05-03 23:11:35 -0400
commitfd142a53ebab66e6d2057a84485a1812499e9410 (patch)
tree3ab2901f14309dc042fb9a269b066d3f0bb35bf4 /configure.ac
parent5ca09e56a79a365d20f480e8900c12d442ecec4a (diff)
downloadlighttpd-git-fd142a53ebab66e6d2057a84485a1812499e9410.tar.gz
[core] use posix_spawn() where available
use posix_spawn() where available use posix_spawn_file_actions_addfchdir_np() where available Using posix_spawn() reduces initial execution overhead of CGI programs; posix_spawn() is often faster than application code wrapping and calling traditional fork(),execve(). (history: fdevent.c posix_spawn code based on fdio.c:fdio_ipc_spawn() from 2015 on one of my unpublished branches. The inability to chdir() delayed inclusion in lighttpd, as the CGI specification says: "The current working directory for the script SHOULD be set to the directory containing the script." e.g. chdir() to target program directory before CGI execution) posix_spawn_file_actions_addfchdir_np() is a new(er) extension supported in glibc 2.29+, musl libc, FreeBSD ≥ 13.1, macOS ≥ 10.15 according to https://cygwin.com/pipermail/cygwin/2023-April/253505.html https://cygwin.com/pipermail/cygwin/2023-April/253526.html https://sourceware.org/bugzilla/show_bug.cgi?id=17405 POSIX Issue 8 plans to include posix_spawn_file_actions_addfchdir(): https://www.austingroupbugs.net/view.php?id=1208
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac2
1 files changed, 2 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index 02b1cdf6..331f95d2 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1461,6 +1461,8 @@ AC_CHECK_FUNCS([\
mkostemp \
pipe2 \
poll \
+ posix_spawn \
+ posix_spawn_file_actions_addfchdir_np \
pread \
pwrite \
sendfile \