提交 4e978184 编写于 作者: P Pavel Krymets

Break away from current job object when starting a process

上级 6db129a5
......@@ -849,7 +849,8 @@ SERVER_PROCESS::StartProcess(
dwCreationFlags = CREATE_NO_WINDOW |
CREATE_UNICODE_ENVIRONMENT |
CREATE_SUSPENDED |
CREATE_NEW_PROCESS_GROUP;
CREATE_NEW_PROCESS_GROUP |
CREATE_BREAKAWAY_FROM_JOB;
if (!CreateProcessW(
NULL, // applicationName
......
......@@ -28,7 +28,7 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
{
BasicLimitInformation = new JOBOBJECT_BASIC_LIMIT_INFORMATION
{
LimitFlags = JOBOBJECTLIMIT.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE
LimitFlags = JOBOBJECTLIMIT.JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE | JOBOBJECTLIMIT.JOB_OBJECT_LIMIT_BREAKAWAY_OK
}
};
......@@ -100,7 +100,8 @@ namespace Microsoft.AspNetCore.Server.IntegrationTesting.IIS
[Flags]
private enum JOBOBJECTLIMIT : uint
{
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x2000
JOB_OBJECT_LIMIT_KILL_ON_JOB_CLOSE = 0x00002000,
JOB_OBJECT_LIMIT_BREAKAWAY_OK = 0x00000800
}
[StructLayout(LayoutKind.Sequential)]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册