_exec_script() close fd and reset signal

+ somes more adjustements in _exec_script()
+ rough notes for non blocking CGI
This commit is contained in:
LuckyLaszlo
2022-08-16 06:50:20 +02:00
parent 4602844f5a
commit ff443c80b1
5 changed files with 107 additions and 26 deletions

View File

@@ -10,6 +10,18 @@
- handle redirection (Work, but weird behavior need deeper test)
- Ecrire des tests !
- cgi_cpp_status.cpp with POST dont show error page. Normal or not ?
For non blocking CGI :
// We could maybe,
// add FD_RD_FR_CHLD to epoll,
// return to the main loop,
// read FD_RD_FR_CHLD each time epoll say its ready,
// then try waitpid() with WNOHANG after each read.
// when waitpid() tell us its finish (or maybe when epoll return EPOLLHUP)
// then actually parse the script_output and send it to the client.
----Priorité modérée------------------------
- namespace utils ?
- change "std::string" to reference "std::string &" in most functions