services: Correctly store the service's PID upon startup.

This commit is contained in:
Eric Pouech 2009-08-29 14:23:36 +02:00 committed by Alexandre Julliard
parent 0ba570141d
commit 7cdf3389dd

View file

@ -577,7 +577,6 @@ static DWORD service_start_process(struct service_entry *service_entry, HANDLE *
}
service_entry->status.dwCurrentState = SERVICE_START_PENDING;
service_entry->status.dwProcessId = pi.dwProcessId;
service_unlock(service_entry);
@ -587,11 +586,11 @@ static DWORD service_start_process(struct service_entry *service_entry, HANDLE *
{
service_lock_exclusive(service_entry);
service_entry->status.dwCurrentState = SERVICE_STOPPED;
service_entry->status.dwProcessId = 0;
service_unlock(service_entry);
return GetLastError();
}
service_entry->status.dwProcessId = pi.dwProcessId;
*process = pi.hProcess;
CloseHandle( pi.hThread );