* mktemp is insecure as it always creates or uses insecure temporary file.
Switch to mkstemp.

* Get and display the error message when an error occurs while creating the temporary file




git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@191616 91177308-0d34-0410-b5e6-96231b3b80d8
Remove useless declaration. If match_type == eNameMatchIgnore, we already left this function at the beginning of the method. Found by coverity. Fixes CID 1094188

git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@191617 91177308-0d34-0410-b5e6-96231b3b80d8
If setgid fails for any reason, exit lldb.

scan-build was complaining about:
The return value from the call to 'setgid' is not checked. If an error occurs in 'setgid', the following code may execute with unexpected privileges






git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@191618 91177308-0d34-0410-b5e6-96231b3b80d8
Fix a memory leak. Found by both scan-build and coverity. Close CID 1096442



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