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
146ed693
Commit
146ed693
authored
Feb 09, 2021
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Return the NT name for the list_processes request.
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
3bb53815
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
18 deletions
+9
-18
process.c
server/process.c
+9
-12
process.h
server/process.h
+0
-6
No files found.
server/process.c
View file @
146ed693
...
@@ -1822,6 +1822,7 @@ DECL_HANDLER(list_processes)
...
@@ -1822,6 +1822,7 @@ DECL_HANDLER(list_processes)
{
{
struct
process
*
process
;
struct
process
*
process
;
struct
thread
*
thread
;
struct
thread
*
thread
;
struct
unicode_str
nt_name
;
unsigned
int
pos
=
0
;
unsigned
int
pos
=
0
;
char
*
buffer
;
char
*
buffer
;
...
@@ -1830,10 +1831,10 @@ DECL_HANDLER(list_processes)
...
@@ -1830,10 +1831,10 @@ DECL_HANDLER(list_processes)
LIST_FOR_EACH_ENTRY
(
process
,
&
process_list
,
struct
process
,
entry
)
LIST_FOR_EACH_ENTRY
(
process
,
&
process_list
,
struct
process
,
entry
)
{
{
struct
process_dll
*
exe
=
get_process_exe_module
(
process
);
struct
memory_view
*
view
=
get_exe_view
(
process
);
if
(
!
view
||
!
get_view_nt_name
(
view
,
&
nt_name
))
nt_name
.
len
=
0
;
reply
->
info_size
=
(
reply
->
info_size
+
7
)
&
~
7
;
reply
->
info_size
=
(
reply
->
info_size
+
7
)
&
~
7
;
reply
->
info_size
+=
sizeof
(
struct
process_info
);
reply
->
info_size
+=
sizeof
(
struct
process_info
)
+
nt_name
.
len
;
if
(
exe
)
reply
->
info_size
+=
exe
->
namelen
;
reply
->
info_size
=
(
reply
->
info_size
+
7
)
&
~
7
;
reply
->
info_size
=
(
reply
->
info_size
+
7
)
&
~
7
;
reply
->
info_size
+=
process
->
running_threads
*
sizeof
(
struct
thread_info
);
reply
->
info_size
+=
process
->
running_threads
*
sizeof
(
struct
thread_info
);
reply
->
process_count
++
;
reply
->
process_count
++
;
...
@@ -1851,12 +1852,13 @@ DECL_HANDLER(list_processes)
...
@@ -1851,12 +1852,13 @@ DECL_HANDLER(list_processes)
LIST_FOR_EACH_ENTRY
(
process
,
&
process_list
,
struct
process
,
entry
)
LIST_FOR_EACH_ENTRY
(
process
,
&
process_list
,
struct
process
,
entry
)
{
{
struct
process_info
*
process_info
;
struct
process_info
*
process_info
;
struct
process_dll
*
exe
=
get_process_exe_module
(
process
);
struct
memory_view
*
view
=
get_exe_view
(
process
);
pos
=
(
pos
+
7
)
&
~
7
;
pos
=
(
pos
+
7
)
&
~
7
;
if
(
!
view
||
!
get_view_nt_name
(
view
,
&
nt_name
))
nt_name
.
len
=
0
;
process_info
=
(
struct
process_info
*
)(
buffer
+
pos
);
process_info
=
(
struct
process_info
*
)(
buffer
+
pos
);
process_info
->
start_time
=
process
->
start_time
;
process_info
->
start_time
=
process
->
start_time
;
process_info
->
name_len
=
exe
?
exe
->
namelen
:
0
;
process_info
->
name_len
=
nt_name
.
len
;
process_info
->
thread_count
=
process
->
running_threads
;
process_info
->
thread_count
=
process
->
running_threads
;
process_info
->
priority
=
process
->
priority
;
process_info
->
priority
=
process
->
priority
;
process_info
->
pid
=
process
->
id
;
process_info
->
pid
=
process
->
id
;
...
@@ -1864,13 +1866,8 @@ DECL_HANDLER(list_processes)
...
@@ -1864,13 +1866,8 @@ DECL_HANDLER(list_processes)
process_info
->
handle_count
=
get_handle_table_count
(
process
);
process_info
->
handle_count
=
get_handle_table_count
(
process
);
process_info
->
unix_pid
=
process
->
unix_pid
;
process_info
->
unix_pid
=
process
->
unix_pid
;
pos
+=
sizeof
(
*
process_info
);
pos
+=
sizeof
(
*
process_info
);
memcpy
(
buffer
+
pos
,
nt_name
.
str
,
nt_name
.
len
);
if
(
exe
)
pos
+=
nt_name
.
len
;
{
memcpy
(
buffer
+
pos
,
exe
->
filename
,
exe
->
namelen
);
pos
+=
exe
->
namelen
;
}
pos
=
(
pos
+
7
)
&
~
7
;
pos
=
(
pos
+
7
)
&
~
7
;
LIST_FOR_EACH_ENTRY
(
thread
,
&
process
->
thread_list
,
struct
thread
,
proc_entry
)
LIST_FOR_EACH_ENTRY
(
thread
,
&
process
->
thread_list
,
struct
thread
,
proc_entry
)
{
{
...
...
server/process.h
View file @
146ed693
...
@@ -153,10 +153,4 @@ static inline int is_process_init_done( struct process *process )
...
@@ -153,10 +153,4 @@ static inline int is_process_init_done( struct process *process )
return
process
->
startup_state
==
STARTUP_DONE
;
return
process
->
startup_state
==
STARTUP_DONE
;
}
}
static
inline
struct
process_dll
*
get_process_exe_module
(
struct
process
*
process
)
{
struct
list
*
ptr
=
list_head
(
&
process
->
dlls
);
return
ptr
?
LIST_ENTRY
(
ptr
,
struct
process_dll
,
entry
)
:
NULL
;
}
#endif
/* __WINE_SERVER_PROCESS_H */
#endif
/* __WINE_SERVER_PROCESS_H */
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