mirror of
https://github.com/reactos/reactos.git
synced 2024-10-06 01:13:38 +00:00
[SERVICES]
- If a service will be started and another service is already running in the same image, send a start command instead of starting the process again. This enables us to run multiple services within a single process, like svchost.exe. svn path=/trunk/; revision=53036
This commit is contained in:
parent
657d4463e4
commit
3d34260a62
|
@ -218,6 +218,8 @@ ScmCreateOrReferenceServiceImage(PSERVICE pService)
|
||||||
pServiceImage->dwImageRunCount++;
|
pServiceImage->dwImageRunCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
DPRINT("pServiceImage->dwImageRunCount: %lu\n", pServiceImage->dwImageRunCount);
|
||||||
|
|
||||||
/* Link the service image to the service */
|
/* Link the service image to the service */
|
||||||
pService->lpImage = pServiceImage;
|
pService->lpImage = pServiceImage;
|
||||||
|
|
||||||
|
@ -1081,6 +1083,13 @@ ScmStartUserModeService(PSERVICE Service,
|
||||||
|
|
||||||
DPRINT("ScmStartUserModeService(%p)\n", Service);
|
DPRINT("ScmStartUserModeService(%p)\n", Service);
|
||||||
|
|
||||||
|
/* If the image is already running ... */
|
||||||
|
if (Service->lpImage->dwImageRunCount > 1)
|
||||||
|
{
|
||||||
|
/* ... just send a start command */
|
||||||
|
return ScmSendStartCommand(Service, argc, argv);
|
||||||
|
}
|
||||||
|
|
||||||
StartupInfo.cb = sizeof(StartupInfo);
|
StartupInfo.cb = sizeof(StartupInfo);
|
||||||
StartupInfo.lpReserved = NULL;
|
StartupInfo.lpReserved = NULL;
|
||||||
StartupInfo.lpDesktop = NULL;
|
StartupInfo.lpDesktop = NULL;
|
||||||
|
|
Loading…
Reference in a new issue