clean comment and stuff

This commit is contained in:
lperrey
2022-08-18 12:44:09 +02:00
parent 9b0fcc1520
commit 469eca8aa9
27 changed files with 100 additions and 325 deletions

View File

@@ -16,6 +16,8 @@ void Webserv::run()
Client *client_cgi_input = NULL;
Client *client_cgi_output = NULL;
std::signal(SIGPIPE, signal_handler);
std::signal(SIGINT, signal_handler);
g_run = true;
while (g_run)
{
@@ -29,7 +31,11 @@ void Webserv::run()
if (errno_copy == EINTR)
g_run = false;
else
{
std::signal(SIGPIPE, SIG_DFL);
std::signal(SIGINT, SIG_DFL);
throw std::runtime_error("Epoll wait");
}
}
else if (nfds == 0 && !_clients.empty())
_timeout();
@@ -101,4 +107,6 @@ void Webserv::run()
}
}
}
std::signal(SIGPIPE, SIG_DFL);
std::signal(SIGINT, SIG_DFL);
}