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
3bf54c29
Commit
3bf54c29
authored
Jan 13, 2008
by
Marcus Meissner
Committed by
Alexandre Julliard
Jan 14, 2008
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Enumerate process in reverse.
parent
83300893
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
toolhelp.c
dlls/kernel32/tests/toolhelp.c
+6
-1
process.c
server/process.c
+1
-1
No files found.
dlls/kernel32/tests/toolhelp.c
View file @
3bf54c29
...
...
@@ -106,6 +106,7 @@ static void test_process(DWORD curr_pid, DWORD sub_pcs_pid)
MODULEENTRY32
me
;
unsigned
found
=
0
;
int
num
=
0
;
int
childpos
=
-
1
;
hSnapshot
=
pCreateToolhelp32Snapshot
(
TH32CS_SNAPPROCESS
,
0
);
ok
(
hSnapshot
!=
NULL
,
"Cannot create snapshot
\n
"
);
...
...
@@ -117,7 +118,7 @@ static void test_process(DWORD curr_pid, DWORD sub_pcs_pid)
do
{
if
(
pe
.
th32ProcessID
==
curr_pid
)
found
++
;
if
(
pe
.
th32ProcessID
==
sub_pcs_pid
)
found
++
;
if
(
pe
.
th32ProcessID
==
sub_pcs_pid
)
{
childpos
=
num
;
found
++
;
}
trace
(
"PID=%x %s
\n
"
,
pe
.
th32ProcessID
,
pe
.
szExeFile
);
num
++
;
}
while
(
pProcess32Next
(
hSnapshot
,
&
pe
));
...
...
@@ -139,6 +140,10 @@ static void test_process(DWORD curr_pid, DWORD sub_pcs_pid)
ok
(
found
==
2
,
"couldn't find self and/or sub-process in process list
\n
"
);
ok
(
!
num
,
"mismatch in counting
\n
"
);
/* one broken program does Process32First() and does not expect anything
* interesting to be there, especially not the just forked off child */
ok
(
childpos
!=
0
,
"child is not expected to be at position 0.
\n
"
);
te
.
dwSize
=
sizeof
(
te
);
ok
(
!
pThread32First
(
hSnapshot
,
&
te
),
"shouldn't return a thread
\n
"
);
...
...
server/process.c
View file @
3bf54c29
...
...
@@ -344,7 +344,7 @@ struct thread *create_process( int fd, struct thread *parent_thread, int inherit
process
->
start_time
=
current_time
;
process
->
end_time
=
0
;
list_add_
head
(
&
process_list
,
&
process
->
entry
);
list_add_
tail
(
&
process_list
,
&
process
->
entry
);
if
(
!
(
process
->
id
=
process
->
group_id
=
alloc_ptid
(
process
)))
{
...
...
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