fix: make child pipe blocking
This commit is contained in:
parent
63c24cf6e8
commit
44790957ce
@ -62,6 +62,8 @@ void CgiProcess::spawn()
|
||||
}
|
||||
if (pid_ == 0)
|
||||
{
|
||||
int flags = fcntl(pipeStdin[0], F_GETFL, 0);
|
||||
if (flags != -1) {fcntl(pipeStdin[0], F_SETFL, flags & ~O_NONBLOCK);}
|
||||
dup2(pipeStdin[0], STDIN_FILENO);
|
||||
dup2(pipeStdout[1], STDOUT_FILENO);
|
||||
dup2(pipeStderr[1], STDERR_FILENO);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user