_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

@@ -106,6 +106,7 @@ class Webserv
// close.cpp
void _close_client(int fd);
void _close_all_clients();
void _close_all_clients_fd();
void _close_all_listen_sockets();
void _reopen_lsocket(std::vector<listen_socket>::iterator it);
void _handle_epoll_error_lsocket(uint32_t events, std::vector<listen_socket>::iterator it);
@@ -131,6 +132,16 @@ class Webserv
void _check_script_fields(Client *client, std::string & output);
void _add_script_body_length_header(std::string & output);
void _remove_body_leading_empty_lines(std::string & output);
///////////////////////
class ExecFail : public std::exception
{
public :
virtual const char* what() const throw() {
return ("Exec CGI fail");
};
};
};
#endif