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

Alexandre Julliard julliard at winehq.org
Sat Aug 29 11:36:40 CDT 2009


Module: wine
Branch: master
Commit: 7cdf3389dd0a45737159064af08ae64b66696ddc
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=7cdf3389dd0a45737159064af08ae64b66696ddc

Author: Eric Pouech <eric.pouech at orange.fr>
Date:   Sat Aug 29 14:23:36 2009 +0200

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

---

 programs/services/services.c |    3 +--
 1 files changed, 1 insertions(+), 2 deletions(-)

diff --git a/programs/services/services.c b/programs/services/services.c
index 091c693..24230e4 100644
--- a/programs/services/services.c
+++ b/programs/services/services.c
@@ -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 );
 




More information about the wine-cvs mailing list