lots of log message and fixed bad_file_descriptor issue

This commit is contained in:
hugogogo
2022-08-22 01:50:28 +02:00
parent 469eca8aa9
commit 5225e3258b
18 changed files with 186 additions and 112 deletions

View File

@@ -19,11 +19,12 @@ void Webserv::run()
std::signal(SIGPIPE, signal_handler);
std::signal(SIGINT, signal_handler);
g_run = true;
family = PARENT;
while (g_run)
{
std::cerr << ++count_loop << "----loop epoll() ";
std::cout << family << "|" << ++count_loop << "-----loop epoll() ";
nfds = ::epoll_wait(_epfd, events, MAX_EVENTS, TIMEOUT);
std::cerr << "(nfds=" << nfds << ")\n";
std::cerr << "(nfds=" << nfds << ")" << std::endl;
if (nfds == -1)
{
int errno_copy = errno;