Changeset 56958 in vbox for trunk/src/VBox/Main/src-server
- Timestamp:
- Jul 16, 2015 5:29:44 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/src-server/ClientWatcher.cpp
r55401 r56958 186 186 break; 187 187 188 bool fPidRace = false; 188 189 do 189 190 { … … 194 195 handles, 195 196 FALSE, 196 INFINITE);197 !fPidRace ? INFINITE : 500); 197 198 198 199 /* Restore the caller before using VirtualBox. If it fails, this … … 202 203 break; 203 204 204 bool update = f alse;205 bool update = fPidRace; 205 206 206 207 if (rc == WAIT_OBJECT_0) … … 275 276 276 277 /* obtain a new set of spawned machines */ 278 fPidRace = false; 277 279 cntSpawned = 0; 278 280 spawnedMachines.clear(); … … 292 294 if (SUCCEEDED(hrc)) 293 295 { 294 HANDLE ph = OpenProcess(SYNCHRONIZE, FALSE, pid); 295 AssertMsg(ph != NULL, ("OpenProcess (pid=%d) failed with %d\n", 296 pid, GetLastError())); 297 if (ph != NULL) 296 if (pid != NIL_RTPROCESS) 298 297 { 299 spawnedMachines.push_back(*it); 300 handles[1 + cnt + cntSpawned] = ph; 301 ++cntSpawned; 298 HANDLE hProc = OpenProcess(SYNCHRONIZE, FALSE, pid); 299 AssertMsg(hProc != NULL, ("OpenProcess (pid=%d) failed with %d\n", pid, GetLastError())); 300 if (hProc != NULL) 301 { 302 spawnedMachines.push_back(*it); 303 handles[1 + cnt + cntSpawned] = hProc; 304 ++cntSpawned; 305 } 302 306 } 307 else 308 fPidRace = true; 303 309 } 304 310 }
Note:
See TracChangeset
for help on using the changeset viewer.