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
3f814c42
Commit
3f814c42
authored
Nov 17, 2023
by
Eric Pouech
Committed by
Alexandre Julliard
Dec 05, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
kernelbase: No longer cache GetStartupInfoW() results.
Signed-off-by:
Eric Pouech
<
epouech@codeweavers.com
>
parent
76018fbb
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
37 deletions
+34
-37
process.c
dlls/kernel32/tests/process.c
+0
-7
process.c
dlls/kernelbase/process.c
+34
-30
No files found.
dlls/kernel32/tests/process.c
View file @
3f814c42
...
@@ -5240,20 +5240,15 @@ static void test_startupinfo( void )
...
@@ -5240,20 +5240,15 @@ static void test_startupinfo( void )
startup_afterW
.
hStdInput
=
(
HANDLE
)
0x43210000
;
startup_afterW
.
hStdInput
=
(
HANDLE
)
0x43210000
;
GetStartupInfoW
(
&
startup_afterW
);
GetStartupInfoW
(
&
startup_afterW
);
todo_wine
ok
(
~
startup_beforeW
.
dwX
==
startup_afterW
.
dwX
,
"Unexpected field value
\n
"
);
ok
(
~
startup_beforeW
.
dwX
==
startup_afterW
.
dwX
,
"Unexpected field value
\n
"
);
if
(
startup_beforeW
.
dwFlags
&
STARTF_USESTDHANDLES
)
if
(
startup_beforeW
.
dwFlags
&
STARTF_USESTDHANDLES
)
{
{
todo_wine
ok
(
params
->
hStdInput
==
startup_afterW
.
hStdInput
,
"Unexpected field value
\n
"
);
ok
(
params
->
hStdInput
==
startup_afterW
.
hStdInput
,
"Unexpected field value
\n
"
);
todo_wine
ok
((
HANDLE
)
~
(
DWORD_PTR
)
startup_beforeW
.
hStdInput
==
startup_afterW
.
hStdInput
,
"Unexpected field value
\n
"
);
ok
((
HANDLE
)
~
(
DWORD_PTR
)
startup_beforeW
.
hStdInput
==
startup_afterW
.
hStdInput
,
"Unexpected field value
\n
"
);
}
}
else
else
{
{
todo_wine
ok
(
startup_beforeW
.
hStdInput
==
(
HANDLE
)
0x12340000
,
"Unexpected field value
\n
"
);
ok
(
startup_beforeW
.
hStdInput
==
(
HANDLE
)
0x12340000
,
"Unexpected field value
\n
"
);
todo_wine
ok
(
startup_afterW
.
hStdInput
==
(
HANDLE
)
0x43210000
,
"Unexpected field value
\n
"
);
ok
(
startup_afterW
.
hStdInput
==
(
HANDLE
)
0x43210000
,
"Unexpected field value
\n
"
);
}
}
...
@@ -5263,11 +5258,9 @@ static void test_startupinfo( void )
...
@@ -5263,11 +5258,9 @@ static void test_startupinfo( void )
startup_afterW
.
hStdInput
=
(
HANDLE
)
0x43210000
;
startup_afterW
.
hStdInput
=
(
HANDLE
)
0x43210000
;
GetStartupInfoW
(
&
startup_afterW
);
GetStartupInfoW
(
&
startup_afterW
);
todo_wine
ok
((
startup_beforeW
.
dwFlags
^
STARTF_USESTDHANDLES
)
==
startup_afterW
.
dwFlags
,
"Unexpected field value
\n
"
);
ok
((
startup_beforeW
.
dwFlags
^
STARTF_USESTDHANDLES
)
==
startup_afterW
.
dwFlags
,
"Unexpected field value
\n
"
);
if
(
startup_afterW
.
dwFlags
&
STARTF_USESTDHANDLES
)
if
(
startup_afterW
.
dwFlags
&
STARTF_USESTDHANDLES
)
{
{
todo_wine
ok
(
params
->
hStdInput
==
startup_afterW
.
hStdInput
,
"Unexpected field value
\n
"
);
ok
(
params
->
hStdInput
==
startup_afterW
.
hStdInput
,
"Unexpected field value
\n
"
);
ok
(
startup_afterW
.
hStdInput
!=
(
HANDLE
)
0x43210000
,
"Unexpected field value
\n
"
);
ok
(
startup_afterW
.
hStdInput
!=
(
HANDLE
)
0x43210000
,
"Unexpected field value
\n
"
);
}
}
...
...
dlls/kernelbase/process.c
View file @
3f814c42
...
@@ -1254,7 +1254,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH TerminateProcess( HANDLE handle, DWORD exit_code )
...
@@ -1254,7 +1254,6 @@ BOOL WINAPI DECLSPEC_HOTPATCH TerminateProcess( HANDLE handle, DWORD exit_code )
***********************************************************************/
***********************************************************************/
static
STARTUPINFOW
startup_infoW
;
static
char
*
command_lineA
;
static
char
*
command_lineA
;
static
WCHAR
*
command_lineW
;
static
WCHAR
*
command_lineW
;
...
@@ -1265,34 +1264,6 @@ void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params )
...
@@ -1265,34 +1264,6 @@ void init_startup_info( RTL_USER_PROCESS_PARAMETERS *params )
{
{
ANSI_STRING
ansi
;
ANSI_STRING
ansi
;
startup_infoW
.
cb
=
sizeof
(
startup_infoW
);
startup_infoW
.
lpReserved
=
NULL
;
startup_infoW
.
lpDesktop
=
params
->
Desktop
.
Buffer
;
startup_infoW
.
lpTitle
=
params
->
WindowTitle
.
Buffer
;
startup_infoW
.
dwX
=
params
->
dwX
;
startup_infoW
.
dwY
=
params
->
dwY
;
startup_infoW
.
dwXSize
=
params
->
dwXSize
;
startup_infoW
.
dwYSize
=
params
->
dwYSize
;
startup_infoW
.
dwXCountChars
=
params
->
dwXCountChars
;
startup_infoW
.
dwYCountChars
=
params
->
dwYCountChars
;
startup_infoW
.
dwFillAttribute
=
params
->
dwFillAttribute
;
startup_infoW
.
dwFlags
=
params
->
dwFlags
;
startup_infoW
.
wShowWindow
=
params
->
wShowWindow
;
startup_infoW
.
cbReserved2
=
params
->
RuntimeInfo
.
MaximumLength
;
startup_infoW
.
lpReserved2
=
params
->
RuntimeInfo
.
MaximumLength
?
(
void
*
)
params
->
RuntimeInfo
.
Buffer
:
NULL
;
if
(
params
->
dwFlags
&
STARTF_USESTDHANDLES
)
{
startup_infoW
.
hStdInput
=
params
->
hStdInput
;
startup_infoW
.
hStdOutput
=
params
->
hStdOutput
;
startup_infoW
.
hStdError
=
params
->
hStdError
;
}
else
{
startup_infoW
.
hStdInput
=
NULL
;
startup_infoW
.
hStdOutput
=
NULL
;
startup_infoW
.
hStdError
=
NULL
;
}
command_lineW
=
params
->
CommandLine
.
Buffer
;
command_lineW
=
params
->
CommandLine
.
Buffer
;
if
(
!
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
params
->
CommandLine
,
TRUE
))
command_lineA
=
ansi
.
Buffer
;
if
(
!
RtlUnicodeStringToAnsiString
(
&
ansi
,
&
params
->
CommandLine
,
TRUE
))
command_lineA
=
ansi
.
Buffer
;
}
}
...
@@ -1332,7 +1303,40 @@ LPWSTR WINAPI GetCommandLineW(void)
...
@@ -1332,7 +1303,40 @@ LPWSTR WINAPI GetCommandLineW(void)
*/
*/
void
WINAPI
DECLSPEC_HOTPATCH
GetStartupInfoW
(
STARTUPINFOW
*
info
)
void
WINAPI
DECLSPEC_HOTPATCH
GetStartupInfoW
(
STARTUPINFOW
*
info
)
{
{
*
info
=
startup_infoW
;
RTL_USER_PROCESS_PARAMETERS
*
params
;
RtlAcquirePebLock
();
params
=
RtlGetCurrentPeb
()
->
ProcessParameters
;
info
->
cb
=
sizeof
(
*
info
);
info
->
lpReserved
=
NULL
;
info
->
lpDesktop
=
params
->
Desktop
.
Buffer
;
info
->
lpTitle
=
params
->
WindowTitle
.
Buffer
;
info
->
dwX
=
params
->
dwX
;
info
->
dwY
=
params
->
dwY
;
info
->
dwXSize
=
params
->
dwXSize
;
info
->
dwYSize
=
params
->
dwYSize
;
info
->
dwXCountChars
=
params
->
dwXCountChars
;
info
->
dwYCountChars
=
params
->
dwYCountChars
;
info
->
dwFillAttribute
=
params
->
dwFillAttribute
;
info
->
dwFlags
=
params
->
dwFlags
;
info
->
wShowWindow
=
params
->
wShowWindow
;
info
->
cbReserved2
=
params
->
RuntimeInfo
.
MaximumLength
;
info
->
lpReserved2
=
params
->
RuntimeInfo
.
MaximumLength
?
(
void
*
)
params
->
RuntimeInfo
.
Buffer
:
NULL
;
if
(
params
->
dwFlags
&
STARTF_USESTDHANDLES
)
{
info
->
hStdInput
=
params
->
hStdInput
;
info
->
hStdOutput
=
params
->
hStdOutput
;
info
->
hStdError
=
params
->
hStdError
;
}
else
{
info
->
hStdInput
=
NULL
;
info
->
hStdOutput
=
NULL
;
info
->
hStdError
=
NULL
;
}
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