Changeset 37311 in vbox
- Timestamp:
- Jun 3, 2011 8:50:36 AM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/r3/win/process-win.cpp
r34708 r37311 204 204 205 205 /** 206 * Removes a process from g_paProcesses .206 * Removes a process from g_paProcesses and closes the process handle. 207 207 * 208 208 * @param pid The process to remove (pid). … … 215 215 if (g_paProcesses[i].pid == pid) 216 216 { 217 HANDLE hProcess = g_paProcesses[i].hProcess; 218 217 219 g_cProcesses--; 218 220 uint32_t cToMove = g_cProcesses - i; 219 221 if (cToMove) 220 222 memmove(&g_paProcesses[i], &g_paProcesses[i + 1], cToMove * sizeof(g_paProcesses[0])); 221 break; 223 224 RTCritSectLeave(&g_CritSect); 225 CloseHandle(hProcess); 226 return; 222 227 } 223 228 RTCritSectLeave(&g_CritSect);
Note:
See TracChangeset
for help on using the changeset viewer.