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
349eba9e
Commit
349eba9e
authored
Feb 01, 2010
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
server: Make terminate_process more robust against recursive calls for the same process.
parent
5c9753e2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
12 deletions
+6
-12
process.c
server/process.c
+6
-12
No files found.
server/process.c
View file @
349eba9e
...
...
@@ -562,23 +562,17 @@ static void process_unload_dll( struct process *process, mod_handle_t base )
/* terminate a process with the given exit code */
static
void
terminate_process
(
struct
process
*
process
,
struct
thread
*
skip
,
int
exit_code
)
{
struct
list
*
ptr
;
if
(
skip
&&
skip
->
process
==
process
)
/* move it to the end of the list */
{
assert
(
skip
->
state
!=
TERMINATED
);
list_remove
(
&
skip
->
proc_entry
);
list_add_tail
(
&
process
->
thread_list
,
&
skip
->
proc_entry
);
}
struct
thread
*
thread
;
grab_object
(
process
);
/* make sure it doesn't get freed when threads die */
while
((
ptr
=
list_head
(
&
process
->
thread_list
)))
restart:
LIST_FOR_EACH_ENTRY
(
thread
,
&
process
->
thread_list
,
struct
thread
,
proc_entry
)
{
struct
thread
*
thread
=
LIST_ENTRY
(
ptr
,
struct
thread
,
proc_entry
);
if
(
exit_code
)
thread
->
exit_code
=
exit_code
;
if
(
thread
==
skip
)
break
;
if
(
thread
==
skip
)
continue
;
if
(
thread
->
state
==
TERMINATED
)
continue
;
kill_thread
(
thread
,
1
);
goto
restart
;
}
release_object
(
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