ProcessLauncherPosixFork: move setgid call into the if(debug) branch

This call was originally being only made when launching for debug (as an
attempt to make sure we don't impart extra privileges on the launched
process), but after the debug and non-debug paths were merged, it made
it's way into generic code. This was causing problems in locked down
android environments which disallowed calling setgid even if it would be
a no-op. This prevented launching llgs from lldb-server platform.

Overall I'm not sure we should be calling setgid in the first place
(it seems random -- e.g. why don't we call setuid then as well).
However, all our other copies of launch code have it, so I choose to
keep it for now.

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@333073 91177308-0d34-0410-b5e6-96231b3b80d8
1 file changed