From 04350cc6218bbebebd2ca8d92579819643064c89 Mon Sep 17 00:00:00 2001 From: 3lswear Date: Sun, 27 Feb 2022 22:38:47 +0300 Subject: [PATCH] exit on cgi error --- src/CGI/CgiHandle.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/CGI/CgiHandle.cpp b/src/CGI/CgiHandle.cpp index 9358735..d4c94b1 100644 --- a/src/CGI/CgiHandle.cpp +++ b/src/CGI/CgiHandle.cpp @@ -117,6 +117,7 @@ std::string CgiHandle::executeCgi() execve(_response.getCgiPass().c_str(), argv, env); std::cerr << WARNING << getDebugTime() << FAIL << " Execve error." << ENDL; write(STDOUT_FILENO, "Status: 500\r\n\r\n", 15); + exit(1); } else { @@ -191,4 +192,4 @@ void CgiHandle::initEnvVariables() CgiHandle::~CgiHandle() { -} \ No newline at end of file +}