diff options
author | Glenn Strauss <gstrauss@gluelogic.com> | 2023-04-19 17:59:01 -0400 |
---|---|---|
committer | Glenn Strauss <gstrauss@gluelogic.com> | 2023-05-03 23:11:35 -0400 |
commit | fd142a53ebab66e6d2057a84485a1812499e9410 (patch) | |
tree | 3ab2901f14309dc042fb9a269b066d3f0bb35bf4 /SConstruct | |
parent | 5ca09e56a79a365d20f480e8900c12d442ecec4a (diff) | |
download | lighttpd-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 'SConstruct')
-rw-r--r-- | SConstruct | 2 |
1 files changed, 2 insertions, 0 deletions
@@ -431,6 +431,8 @@ if 1: 'mmap', 'pipe2', 'poll', + 'posix_spawn', + 'posix_spawn_file_actions_addfchdir_np', 'pread', 'preadv', 'pwrite', |