Sebastian Lackner : server: Properly inherit debug_children flag when creating new process.

Alexandre Julliard julliard at wine.codeweavers.com
Mon Aug 24 07:37:15 CDT 2015


Module: wine
Branch: master
Commit: c948e84189f33b9ea684b6e4eaa4e53358b352d7
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=c948e84189f33b9ea684b6e4eaa4e53358b352d7

Author: Sebastian Lackner <sebastian at fds-team.de>
Date:   Mon Aug 24 10:18:49 2015 +0200

server: Properly inherit debug_children flag when creating new process.

---

 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;




More information about the wine-cvs mailing list