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

@@ -36,7 +36,7 @@ int Webserv::_read_request(Client *client)
ssize_t ret;
ret = ::recv(client->get_cl_fd(), buf, BUFSIZE, 0);
std::cout << family << "| (" << std::setw(2) << client->get_cl_fd() << ") recv() ret = " << ret << std::endl;
print_secure(client->get_cl_fd(), "recv() ret = " + ::itos(ret) + "\n");
if (ret == -1)
{
std::perror("err recv()");