From 0827a8ee27b716647af819aa89eec29913ace7ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=BA=90=E6=96=87=E9=9B=A8?= <41315874+fumiama@users.noreply.github.com> Date: Sat, 8 Jul 2023 19:55:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96=E4=BB=A3=E7=A0=81=E8=A1=A8?= =?UTF-8?q?=E8=BE=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server.c b/server.c index d67774a..a06817a 100644 --- a/server.c +++ b/server.c @@ -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]);