1
0
mirror of https://github.com/fumiama/simple-http-server.git synced 2026-06-05 00:30:23 +08:00

优化代码表达

This commit is contained in:
源文雨
2023-07-08 19:55:37 +08:00
parent 2a9599ba1b
commit 0827a8ee27

View File

@@ -247,8 +247,8 @@ static void execute_cgi(int client, int content_length, const http_request_t* re
}
/* child: CGI script */
if(pid == 0) {
dup2(cgi_output[1], 1);
dup2(cgi_input[0], 0);
dup2(cgi_output[1], STDOUT_FILENO);
dup2(cgi_input[0], STDIN_FILENO);
close(cgi_output[0]);
close(cgi_input[1]);