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:
源文雨
2021-08-14 11:37:11 +08:00
parent b076ca71dc
commit 2a8128025b

View File

@@ -229,6 +229,7 @@ static void execute_cgi(int client, int content_length, const HTTP_REQUEST* requ
else if(pid == 0) {
char env[255];
signal(SIGCHLD,SIG_IGN);
dup2(cgi_output[1], 1);
dup2(cgi_input[0], 0);
close(cgi_output[0]);