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
ce07a776
Commit
ce07a776
authored
Apr 15, 2016
by
Sebastian Lackner
Committed by
Alexandre Julliard
Apr 15, 2016
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
services: Initialize environment block immediately after startup.
Signed-off-by:
Sebastian Lackner
<
sebastian@fds-team.de
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
99130182
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
services.c
programs/services/services.c
+11
-11
No files found.
programs/services/services.c
View file @
ce07a776
...
...
@@ -724,17 +724,6 @@ static DWORD service_start_process(struct service_entry *service_entry)
service_lock
(
service_entry
);
if
(
!
env
)
{
HANDLE
htok
;
if
(
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
|
TOKEN_DUPLICATE
,
&
htok
))
CreateEnvironmentBlock
(
&
env
,
htok
,
FALSE
);
if
(
!
env
)
WINE_ERR
(
"failed to create services environment
\n
"
);
}
if
((
err
=
get_service_binary_path
(
service_entry
,
&
path
)))
{
service_unlock
(
service_entry
);
...
...
@@ -976,9 +965,20 @@ static void load_registry_parameters(void)
int
main
(
int
argc
,
char
*
argv
[])
{
static
const
WCHAR
svcctl_started_event
[]
=
SVCCTL_STARTED_EVENT
;
HANDLE
htok
;
DWORD
err
;
g_hStartedEvent
=
CreateEventW
(
NULL
,
TRUE
,
FALSE
,
svcctl_started_event
);
if
(
OpenProcessToken
(
GetCurrentProcess
(),
TOKEN_QUERY
|
TOKEN_DUPLICATE
,
&
htok
))
{
CreateEnvironmentBlock
(
&
env
,
htok
,
FALSE
);
CloseHandle
(
htok
);
}
if
(
!
env
)
WINE_ERR
(
"failed to create services environment
\n
"
);
load_registry_parameters
();
err
=
scmdatabase_create
(
&
active_database
);
if
(
err
!=
ERROR_SUCCESS
)
...
...
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