Patch from Dawn that fixes up linux debugging and a first passs at an 
implementation of the linux platform.



git-svn-id: https://llvm.org/svn/llvm-project/lldb/trunk@145433 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/source/Plugins/Process/Linux/ProcessLinux.cpp b/source/Plugins/Process/Linux/ProcessLinux.cpp
index 6a0c54c..2171a6d 100644
--- a/source/Plugins/Process/Linux/ProcessLinux.cpp
+++ b/source/Plugins/Process/Linux/ProcessLinux.cpp
@@ -87,7 +87,6 @@
       m_in_limbo(false),
       m_exit_now(false)
 {
-
 #if 0
     // FIXME: Putting this code in the ctor and saving the byte order in a
     // member variable is a hack to avoid const qual issues in GetByteOrder.
@@ -152,7 +151,6 @@
 
     SetPrivateState(eStateLaunching);
 
-    uint32_t launch_flags = launch_info.GetFlags().Get();
     const char *stdin_path = NULL;
     const char *stdout_path = NULL;
     const char *stderr_path = NULL;
@@ -270,7 +268,13 @@
 Error
 ProcessLinux::DoDetach()
 {
-    return Error(1, eErrorTypeGeneric);
+    Error error;
+
+    error = m_monitor->Detach();
+    if (error.Success())
+        SetPrivateState(eStateDetached);
+
+    return error;
 }
 
 Error
@@ -388,7 +392,7 @@
 ProcessLinux::IsAlive()
 {
     StateType state = GetPrivateState();
-    return state != eStateExited && state != eStateInvalid;
+    return state != eStateDetached && state != eStateExited && state != eStateInvalid;
 }
 
 size_t