server: Properly inherit debug_children flag when creating new process.

Sebastian Lackner sebastian at fds-team.de
Mon Aug 24 03:18:49 CDT 2015


---
 server/process.c |    8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/server/process.c b/server/process.c
index d4c8adf..e00b429 100644
--- a/server/process.c
+++ b/server/process.c
@@ -1181,8 +1181,6 @@ DECL_HANDLER(new_process)
 
     if (!(thread = create_process( socket_fd, current, req->inherit_all ))) goto done;
     process = thread->process;
-    process->debug_children = (req->create_flags & DEBUG_PROCESS)
-        && !(req->create_flags & DEBUG_ONLY_THIS_PROCESS);
     process->startup_info = (struct startup_info *)grab_object( info );
 
     if (parent->job
@@ -1223,9 +1221,15 @@ DECL_HANDLER(new_process)
 
     /* attach to the debugger if requested */
     if (req->create_flags & (DEBUG_PROCESS | DEBUG_ONLY_THIS_PROCESS))
+    {
         set_process_debugger( process, current );
+        process->debug_children = !(req->create_flags & DEBUG_ONLY_THIS_PROCESS);
+    }
     else if (parent->debugger && parent->debug_children)
+    {
         set_process_debugger( process, parent->debugger );
+        process->debug_children = 1;
+    }
 
     if (!(req->create_flags & CREATE_NEW_PROCESS_GROUP))
         process->group_id = parent->group_id;
-- 
2.5.0



More information about the wine-patches mailing list