Process hangs on waitpid #1063

This commit is contained in:
Alex Fabijanic
2015-12-06 23:18:29 -06:00
parent 4499062f0d
commit 95f1a7c30d

View File

@@ -207,7 +207,7 @@ ProcessHandleImpl* ProcessImpl::launchByForkExecImpl(const std::string& command,
if (outPipe) outPipe->close(Pipe::CLOSE_BOTH);
if (errPipe) errPipe->close(Pipe::CLOSE_BOTH);
// close all open file descriptors other than stdin, stdout, stderr
for (int fd = 3; i < sysconf(_SC_OPEN_MAX); ++fd)
for (int fd = 3; fd < sysconf(_SC_OPEN_MAX); ++fd)
{
close(fd);
}