advapi32: Don't wait for 20 seconds if a service fails to start.

This commit is contained in:
Alexandre Julliard 2008-01-04 12:50:11 +01:00
parent d56217e98e
commit 3133280d08
1 changed files with 2 additions and 0 deletions

View File

@ -455,6 +455,7 @@ static BOOL service_handle_start(HANDLE pipe, service_data *service, DWORD count
HeapFree(GetProcessHeap(), 0, service->args);
service->args = args;
args = NULL;
service->status.dwCurrentState = SERVICE_START_PENDING;
service->thread = CreateThread( NULL, 0, service_thread,
service, 0, NULL );
SetEvent( service_event ); /* notify the main loop */
@ -1625,6 +1626,7 @@ static BOOL service_wait_for_startup(SC_HANDLE hService)
break;
}
r = FALSE;
if (status.dwCurrentState != SERVICE_START_PENDING) break;
Sleep(100 * i);
}
return r;