Bootstrap

windows的RemoveHandles函数bug

1.函数整体逻辑

			if (Node->MarkThreadExit == TRUE)
			{
				if (Node->dwProcessId == dwProcessId || Node->dwThreadId== dwThreadId)
				{
					if (Node->hThread != NULL)
					{
						CloseHandle(Node->hThread);
					}
					if (Node->hProcess != NULL)
					{
						CloseHandle(Node->hProcess);
					}
					//移除Node
				}
			}
			else
			{
				Entry = Entry->Next;
			}

如果节点2满足要求需要删除,那么windows进行的操作是

head -> node1 -> node2 -> node3 -> NULL
head  -> node3 -> NULL
 那么Node1 将丢失

;