fixed CGI alloc

+ handle unknow status from script
This commit is contained in:
lperrey
2022-08-16 01:46:24 +02:00
parent e691c517e8
commit f8c6923c6d
5 changed files with 91 additions and 49 deletions

View File

@@ -24,7 +24,7 @@ void Webserv::init_virtual_servers(std::vector<ServerConfig>* servers)
continue;
}
ret = ::socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK, 0); // (SOCK_CLOEXEC) for CGI fork ?
ret = ::socket(AF_INET, SOCK_STREAM | SOCK_NONBLOCK | SOCK_CLOEXEC, 0);
if (ret == -1)
{
std::perror("err socket()");