Skip to content
Commit 1f982c2d authored by Greg Clayton's avatar Greg Clayton
Browse files

Correctly get the arguments and environment, even for processes that have a...

Correctly get the arguments and environment, even for processes that have a large amount or arguments and/or environment variables.

We previously passed in a 8192 byte buffer but this wasn't large enough. We now calculate the size we need and then add 128 to it and get the environment. If we pass exactly the number of bytes it says is needs, the sysctl() returns junk. Adding 1 seemed to do the trick, but to err on the side of caution, I added a few bytes more.

<rdar://problem/21883842>

llvm-svn: 242729
parent 1bf0f8ed
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment