Skip to content

Commit

Permalink
fix(Process): variable masking and spelling #2366
Browse files Browse the repository at this point in the history
  • Loading branch information
Pavle committed Nov 16, 2023
1 parent 6382744 commit 8c4d83c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Foundation/src/Process_UNIX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -184,7 +184,7 @@ ProcessHandleImpl* ProcessImpl::launchByForkExecImpl(const std::string& command,

do
{
// We must not allocated memory after fork(),
// We must not allocate memory after fork(),
// therefore allocate all required buffers first.

std::vector<char> envChars = getEnvironmentVariablesBuffer(env);
Expand Down Expand Up @@ -242,9 +242,9 @@ ProcessHandleImpl* ProcessImpl::launchByForkExecImpl(const std::string& command,
long fdMax = sysconf(_SC_OPEN_MAX);
// on some systems, sysconf(_SC_OPEN_MAX) returns a ridiculously high number
if (fdMax > CLOSE_FD_MAX) fdMax = CLOSE_FD_MAX;
for (long i = 3; i < fdMax; ++i)
for (long j = 3; j < fdMax; ++j)
{
close(i);
close(j);
}

execvp(argv[0], &argv[0]);
Expand Down

0 comments on commit 8c4d83c

Please sign in to comment.