diff options
author | Magnus Svensson <msvensson@mysql.com> | 2009-02-06 08:38:24 +0100 |
---|---|---|
committer | Magnus Svensson <msvensson@mysql.com> | 2009-02-06 08:38:24 +0100 |
commit | aca7ca6bbaf7e86b0999da53bc33be265ba6243c (patch) | |
tree | 5c2332396375762573e948b80eef5eaa055b8a11 /mysql-test/lib | |
parent | 1177405381be840a1cb1746e9aa2b602f50bc135 (diff) | |
download | mariadb-git-aca7ca6bbaf7e86b0999da53bc33be265ba6243c.tar.gz |
Bug#42641 mtr.pl fails to run within JobObject
- 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).
Diffstat (limited to 'mysql-test/lib')
-rwxr-xr-x | mysql-test/lib/My/SafeProcess/safe_process_win.cc | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/mysql-test/lib/My/SafeProcess/safe_process_win.cc b/mysql-test/lib/My/SafeProcess/safe_process_win.cc index 8aa603a8793..640254875c9 100755 --- a/mysql-test/lib/My/SafeProcess/safe_process_win.cc +++ b/mysql-test/lib/My/SafeProcess/safe_process_win.cc @@ -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, |