Changeset 21139 in vbox
- Timestamp:
- Jul 1, 2009 6:23:59 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r19532 r21139 278 278 VBoxServiceVerbose(2, "Initializing services ...\n"); 279 279 for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++) 280 { 281 rc = g_aServices[j].pDesc->pfnInit(); 282 if (RT_FAILURE(rc)) 280 if (g_aServices[j].fEnabled) 283 281 { 284 VBoxServiceError("Service '%s' failed pre-init: %Rrc\n", g_aServices[j].pDesc->pszName); 285 return rc; 282 283 rc = g_aServices[j].pDesc->pfnInit(); 284 if (RT_FAILURE(rc)) 285 { 286 VBoxServiceError("Service '%s' failed pre-init: %Rrc\n", g_aServices[j].pDesc->pszName); 287 return rc; 288 } 286 289 } 287 }288 290 289 291 /* … … 342 344 g_aServices[j].pDesc->pfnStop(); 343 345 for (unsigned j = 0; j < RT_ELEMENTS(g_aServices); j++) 344 { 345 if (g_aServices[j].Thread != NIL_RTTHREAD) 346 if (g_aServices[j].fEnabled) 346 347 { 347 int rc = RTThreadWait(g_aServices[j].Thread, 30*1000, NULL); 348 if (RT_FAILURE(rc)) 349 VBoxServiceError("Service '%s' failed to stop. (%Rrc)\n", g_aServices[j].pDesc->pszName, rc); 348 if (g_aServices[j].Thread != NIL_RTTHREAD) 349 { 350 int rc = RTThreadWait(g_aServices[j].Thread, 30*1000, NULL); 351 if (RT_FAILURE(rc)) 352 VBoxServiceError("Service '%s' failed to stop. (%Rrc)\n", g_aServices[j].pDesc->pszName, rc); 353 } 354 g_aServices[j].pDesc->pfnTerm(); 350 355 } 351 g_aServices[j].pDesc->pfnTerm();352 }353 356 354 357 VBoxServiceVerbose(2, "Stopping services returned: rc=%Rrc\n", rc);
Note:
See TracChangeset
for help on using the changeset viewer.

