Commit 754854a4 authored by brettw@chromium.org's avatar brettw@chromium.org

Fix GN hang spawning a process.

I "cleverly" used std::copy assuming it would not malloc or lock, but it does in the debug build of the STL (at least) to do some verification. This causes the fork to hang on Posix.

This version matches the base code.

BUG=
R=viettrungluu@chromium.org

Review URL: https://codereview.chromium.org/299003003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@272571 0039d316-1c4b-4281-b951-d872f2087c98
parent 94d6253b
......@@ -187,8 +187,8 @@ bool ExecProcess(const CommandLine& cmdline,
// Adding another element here? Remeber to increase the argument to
// reserve(), above.
std::copy(fd_shuffle1.begin(), fd_shuffle1.end(),
std::back_inserter(fd_shuffle2));
for (size_t i = 0; i < fd_shuffle1.size(); ++i)
fd_shuffle2.push_back(fd_shuffle1[i]);
if (!ShuffleFileDescriptors(&fd_shuffle1))
_exit(127);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment