Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
8484d3fb
Commit
8484d3fb
authored
Sep 14, 2004
by
Alexander Yaworsky
Committed by
Alexandre Julliard
Sep 14, 2004
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Proper finalization in StartServiceW.
parent
0e74f851
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
7 deletions
+17
-7
service.c
dlls/advapi32/service.c
+17
-7
No files found.
dlls/advapi32/service.c
View file @
8484d3fb
...
@@ -876,6 +876,8 @@ StartServiceW( SC_HANDLE hService, DWORD dwNumServiceArgs,
...
@@ -876,6 +876,8 @@ StartServiceW( SC_HANDLE hService, DWORD dwNumServiceArgs,
HANDLE
data
,
wait
;
HANDLE
data
,
wait
;
PROCESS_INFORMATION
procinfo
;
PROCESS_INFORMATION
procinfo
;
STARTUPINFOW
startupinfo
;
STARTUPINFOW
startupinfo
;
BOOL
ret
=
FALSE
;
TRACE
(
"(%p,%ld,%p)
\n
"
,
hService
,
dwNumServiceArgs
,
TRACE
(
"(%p,%ld,%p)
\n
"
,
hService
,
dwNumServiceArgs
,
lpServiceArgVectors
);
lpServiceArgVectors
);
...
@@ -934,19 +936,27 @@ StartServiceW( SC_HANDLE hService, DWORD dwNumServiceArgs,
...
@@ -934,19 +936,27 @@ StartServiceW( SC_HANDLE hService, DWORD dwNumServiceArgs,
if
(
r
==
FALSE
)
if
(
r
==
FALSE
)
{
{
ERR
(
"Couldn't start process
\n
"
);
ERR
(
"Couldn't start process
\n
"
);
/* ReleaseSemaphore(data, 1, NULL);
goto
done
;
return FALSE; */
}
}
CloseHandle
(
procinfo
.
hThread
);
/* docs for StartServiceCtrlDispatcher say this should be 30 sec */
/* docs for StartServiceCtrlDispatcher say this should be 30 sec */
r
=
WaitForSingleObject
(
wait
,
30000
);
r
=
WaitForSingleObject
(
wait
,
30000
);
if
(
WAIT_FAILED
==
r
)
{
CloseHandle
(
procinfo
.
hProcess
);
goto
done
;
}
ReleaseSemaphore
(
data
,
1
,
NULL
);
/* allright */
CloseHandle
(
procinfo
.
hProcess
);
if
(
r
==
WAIT_FAILED
)
ret
=
TRUE
;
return
FALSE
;
return
TRUE
;
done:
CloseHandle
(
wait
);
ReleaseSemaphore
(
data
,
1
,
NULL
);
CloseHandle
(
data
);
return
ret
;
}
}
/******************************************************************************
/******************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment