added semaphore and shared memory to print without superposition between parent and child process

This commit is contained in:
hugogogo
2022-08-22 14:52:31 +02:00
parent 5225e3258b
commit f7b31c7db7
14 changed files with 127 additions and 65 deletions

View File

@@ -8,7 +8,7 @@ void Webserv::_accept_connection(listen_socket &lsocket)
int accepted_fd;
std::map<std::string, std::string> infos;
std::cerr << family << "| " << " accept() socket (" << lsocket.fd << ")\n";
print_secure(" accept() socket (" + ::itos(lsocket.fd) + ")\n");
addr_len = sizeof addr;
accepted_fd = ::accept(lsocket.fd, (sockaddr*)&addr, &addr_len);
if (accepted_fd == -1)