Changeset 39428 in vbox
- Timestamp:
- Nov 25, 2011 4:18:40 PM (13 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxServiceControl.cpp
r39427 r39428 55 55 * Internal Functions * 56 56 *******************************************************************************/ 57 /** @todo Shorten "VBoxServiceControl" to " vbgsvcCntl". */57 /** @todo Shorten "VBoxServiceControl" to "gstsvcCntl". */ 58 58 static int VBoxServiceControlStartAllowed(bool *pbAllowed); 59 59 static int VBoxServiceControlHandleCmdStartProc(uint32_t u32ClientId, uint32_t uNumParms); … … 814 814 * not used anymore. */ 815 815 PVBOXSERVICECTRLTHREAD pThreadCur; 816 RTListForEach(&g_GuestControlThreads, pThreadCur, VBOXSERVICECTRLTHREAD, Node)817 {818 if ( pThreadCur->uPID == uPID819 && pThreadCur != pThread)816 bool fTryAgain = false; 817 do 818 { 819 RTListForEach(&g_GuestControlThreads, pThreadCur, VBOXSERVICECTRLTHREAD, Node) 820 820 { 821 VBoxServiceVerbose(2, "ControlThread: PID %u was used before, shutting down stale exec thread ...\n", 822 uPID); 823 rc = VBoxServiceControlThreadSignalShutdown(pThreadCur); 824 if (RT_SUCCESS(rc)) 825 rc = VBoxServiceControlThreadWaitForShutdown(pThreadCur, 826 30 * 1000 /* Wait 30 seconds max. */); 821 if (pThreadCur->uPID == uPID) 822 { 823 Assert(pThreadCur != pThread); /* can't happen */ 824 uint32_t uTriedPID = uPID; 825 uPID += 391939; 826 VBoxServiceVerbose(2, "ControlThread: PID %u was used before, trying again with %u ...\n", 827 uTriedPID, uPID); 828 fTryAgain = true; 829 break; 830 } 827 831 } 828 } 832 } while (fTryAgain); 829 833 830 834 /* Assign PID to current thread. */
Note:
See TracChangeset
for help on using the changeset viewer.