aboutsummaryrefslogtreecommitdiff
path: root/modutils/depmod.c
diff options
context:
space:
mode:
authorRon Yorston <rmy@pobox.com>2023-12-20 13:45:32 +0000
committerRon Yorston <rmy@pobox.com>2023-12-20 13:59:17 +0000
commit8d85a4a5be88931978fad594b94e762313d37afc (patch)
tree0f964f6cd9b0c71b02de5011a2f815e1470c8740 /modutils/depmod.c
parent4f9b703c31e6360d1e7ffe7d3410e42e5118b4fd (diff)
downloadbusybox-w32-8d85a4a5be88931978fad594b94e762313d37afc.tar.gz
busybox-w32-8d85a4a5be88931978fad594b94e762313d37afc.tar.bz2
busybox-w32-8d85a4a5be88931978fad594b94e762313d37afc.zip
httpd: enable support for CGI
The upstream code uses fork/exec when running a CGI process. Emulate this by: - Spawning a child httpd process with the special '-I 0' option, along with the options provided on the server command line. This sets up the proper state then calls the cgi_handler() function. - The cgi_handler() function fixes the pipe file descriptors and starts another child process to run the CGI script. These processes are detached from the console on creation. When spawn() functions are run in P_DETACH mode they don't connect to the standard file descriptors. Normally this doesn't matter but the process which runs the CGI scripts needs to inherit the pipe endpoints. The create_detached_process() function handles this. See: https://github.com/rprichard/win32-console-docs/blob/master/README.md Adds about 2.9Kb to the size of the binary. (GitHub issue #266)
Diffstat (limited to 'modutils/depmod.c')
0 files changed, 0 insertions, 0 deletions