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
ce1196a8
Commit
ce1196a8
authored
Oct 04, 2005
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Copy WINEDEBUG from the Windows environment to allow passing a
modified value to a child process.
parent
dc51bd79
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
1 deletion
+16
-1
process.c
dlls/kernel/process.c
+16
-1
No files found.
dlls/kernel/process.c
View file @
ce1196a8
...
...
@@ -1426,6 +1426,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
BOOL
ret
,
success
=
FALSE
;
HANDLE
process_info
;
WCHAR
*
env_end
;
char
*
winedebug
=
NULL
;
RTL_USER_PROCESS_PARAMETERS
*
params
;
int
startfd
[
2
];
int
execfd
[
2
];
...
...
@@ -1442,7 +1443,17 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
return
FALSE
;
}
env_end
=
params
->
Environment
;
while
(
*
env_end
)
env_end
+=
strlenW
(
env_end
)
+
1
;
while
(
*
env_end
)
{
static
const
WCHAR
WINEDEBUG
[]
=
{
'W'
,
'I'
,
'N'
,
'E'
,
'D'
,
'E'
,
'B'
,
'U'
,
'G'
,
'='
,
0
};
if
(
!
winedebug
&&
!
strncmpW
(
env_end
,
WINEDEBUG
,
sizeof
(
WINEDEBUG
)
/
sizeof
(
WCHAR
)
-
1
))
{
DWORD
len
=
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
env_end
,
-
1
,
NULL
,
0
,
NULL
,
NULL
);
if
((
winedebug
=
HeapAlloc
(
GetProcessHeap
(),
0
,
len
)))
WideCharToMultiByte
(
CP_UNIXCP
,
0
,
env_end
,
-
1
,
winedebug
,
len
,
NULL
,
NULL
);
}
env_end
+=
strlenW
(
env_end
)
+
1
;
}
env_end
++
;
sprintf
(
preloader_reserve
,
"WINEPRELOADRESERVE=%lx-%lx%c"
,
...
...
@@ -1453,6 +1464,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
if
(
pipe
(
startfd
)
==
-
1
)
{
if
(
!
env
)
RtlReleasePebLock
();
HeapFree
(
GetProcessHeap
(),
0
,
winedebug
);
SetLastError
(
ERROR_TOO_MANY_OPEN_FILES
);
RtlDestroyProcessParameters
(
params
);
return
FALSE
;
...
...
@@ -1460,6 +1472,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
if
(
pipe
(
execfd
)
==
-
1
)
{
if
(
!
env
)
RtlReleasePebLock
();
HeapFree
(
GetProcessHeap
(),
0
,
winedebug
);
SetLastError
(
ERROR_TOO_MANY_OPEN_FILES
);
close
(
startfd
[
0
]
);
close
(
startfd
[
1
]
);
...
...
@@ -1486,6 +1499,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
signal
(
SIGCHLD
,
SIG_DFL
);
putenv
(
preloader_reserve
);
if
(
winedebug
)
putenv
(
winedebug
);
if
(
unixdir
)
chdir
(
unixdir
);
if
(
argv
)
...
...
@@ -1505,6 +1519,7 @@ static BOOL create_process( HANDLE hFile, LPCWSTR filename, LPWSTR cmd_line, LPW
close
(
startfd
[
0
]
);
close
(
execfd
[
1
]
);
HeapFree
(
GetProcessHeap
(),
0
,
winedebug
);
if
(
pid
==
-
1
)
{
if
(
!
env
)
RtlReleasePebLock
();
...
...
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