Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
1aa26416
Commit
1aa26416
authored
Jun 11, 1999
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Use the normal environment routines to build the env db of the initial
process.
parent
039aa423
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
37 deletions
+8
-37
process.h
include/process.h
+0
-1
environ.c
memory/environ.c
+7
-2
process.c
scheduler/process.c
+1
-34
No files found.
include/process.h
View file @
1aa26416
...
...
@@ -147,7 +147,6 @@ extern DWORD WINAPI GetProcessDword( DWORD dwProcessID, INT offset );
void
WINAPI
SetProcessDword
(
DWORD
dwProcessID
,
INT
offset
,
DWORD
value
);
/* scheduler/environ.c */
extern
BOOL
ENV_BuildEnvironment
(
PDB
*
pdb
);
extern
BOOL
ENV_InheritEnvironment
(
PDB
*
pdb
,
LPCSTR
env
);
extern
void
ENV_FreeEnvironment
(
PDB
*
pdb
);
...
...
memory/environ.c
View file @
1aa26416
...
...
@@ -65,7 +65,7 @@ static LPCSTR ENV_FindVariable( LPCSTR env, LPCSTR name, INT len )
*
* Build the environment for the initial process
*/
BOOL
ENV_BuildEnvironment
(
PDB
*
pdb
)
static
BOOL
ENV_BuildEnvironment
(
PDB
*
pdb
)
{
extern
char
**
environ
;
LPSTR
p
,
*
e
;
...
...
@@ -109,7 +109,12 @@ BOOL ENV_InheritEnvironment( PDB *pdb, LPCSTR env )
LPSTR
dst
;
/* FIXME: should lock the parent environment */
if
(
!
env
)
env
=
pdb
->
parent
->
env_db
->
environ
;
if
(
!
env
)
{
if
(
!
pdb
->
parent
)
/* initial process */
return
ENV_BuildEnvironment
(
pdb
);
env
=
pdb
->
parent
->
env_db
->
environ
;
}
/* Compute the environment size */
...
...
scheduler/process.c
View file @
1aa26416
...
...
@@ -230,39 +230,6 @@ void PROCESS_CallUserSignalProc( UINT uCode, HMODULE hModule )
/***********************************************************************
* PROCESS_BuildEnvDB
*
* Build the env DB for the initial process
*/
static
BOOL
PROCESS_BuildEnvDB
(
PDB
*
pdb
)
{
/* Allocate the env DB (FIXME: should not be on the system heap) */
if
(
!
(
pdb
->
env_db
=
HeapAlloc
(
SystemHeap
,
HEAP_ZERO_MEMORY
,
sizeof
(
ENVDB
))))
return
FALSE
;
InitializeCriticalSection
(
&
pdb
->
env_db
->
section
);
/* Allocate startup info */
if
(
!
(
pdb
->
env_db
->
startup_info
=
HeapAlloc
(
SystemHeap
,
HEAP_ZERO_MEMORY
,
sizeof
(
STARTUPINFOA
)
)))
return
FALSE
;
/* Allocate the standard handles */
pdb
->
env_db
->
hStdin
=
FILE_DupUnixHandle
(
0
,
GENERIC_READ
);
pdb
->
env_db
->
hStdout
=
FILE_DupUnixHandle
(
1
,
GENERIC_WRITE
);
pdb
->
env_db
->
hStderr
=
FILE_DupUnixHandle
(
2
,
GENERIC_WRITE
);
/* Build the command-line */
pdb
->
env_db
->
cmd_line
=
HEAP_strdupA
(
SystemHeap
,
0
,
"kernel32"
);
/* Build the environment strings */
return
ENV_BuildEnvironment
(
pdb
);
}
/***********************************************************************
* PROCESS_CreateEnvDB
*
* Create the env DB for a newly started process.
...
...
@@ -391,7 +358,7 @@ BOOL PROCESS_Init(void)
initial_pdb
.
system_heap
=
initial_pdb
.
heap
=
SystemHeap
;
/* Create the environment DB of the first process */
if
(
!
PROCESS_
BuildEnvDB
(
&
initial_pdb
))
return
FALSE
;
if
(
!
PROCESS_
CreateEnvDB
(
))
return
FALSE
;
/* Create the SEGPTR heap */
if
(
!
(
SegptrHeap
=
HeapCreate
(
HEAP_WINE_SEGPTR
,
0
,
0
)))
return
FALSE
;
...
...
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