List:Commits« Previous MessageNext Message »
From:Magnus Svensson Date:February 6 2009 11:31am
Subject:bzr commit into mysql-5.1-bugteam branch (msvensson:2789)
View as plain text  
#At file:///home/msvensson/mysql/5.1-bugteam/ based on revid:davi.arnaut@stripped

 2789 Magnus Svensson	2009-02-06 [merge]
      Merge
modified:
  mysql-test/lib/My/SafeProcess/safe_process_win.cc

=== modified file 'mysql-test/lib/My/SafeProcess/safe_process_win.cc'
--- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2008-03-14 12:34:39 +0000
+++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc	2009-02-06 07:38:24 +0000
@@ -237,12 +237,19 @@ int main(int argc, const char** argv )
   /*
     Create the process suspended to make sure it's assigned to the
     Job before it creates any process of it's own
+
+    Allow the new process to break away from any job that this
+    process is part of so that it can be assigned to the new JobObject
+    we just created. This is safe since the new JobObject is created with
+    the JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE flag, making sure it will be
+    terminated when the last handle to it is closed(which is owned by
+    this process).
   */
   if (CreateProcess(NULL, (LPSTR)child_args,
                     NULL,
                     NULL,
                     TRUE, /* inherit handles */
-                    CREATE_SUSPENDED,
+                    CREATE_SUSPENDED | CREATE_BREAKAWAY_FROM_JOB,
                     NULL,
                     NULL,
                     &si,

Thread
bzr commit into mysql-5.1-bugteam branch (msvensson:2789)Magnus Svensson6 Feb