GH #1050 Foundation: fix gcc -Wshadow warnings

This commit is contained in:
Miklos Vajna
2015-11-30 15:49:07 +01:00
parent c38ed216d2
commit b9cfd346a1
46 changed files with 360 additions and 360 deletions

View File

@@ -207,9 +207,9 @@ 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 i = 3; i < sysconf(_SC_OPEN_MAX); ++i)
for (int fd = 3; i < sysconf(_SC_OPEN_MAX); ++fd)
{
close(i);
close(fd);
}
execvp(argv[0], &argv[0]);