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
fcbd0da4
Commit
fcbd0da4
authored
May 06, 2003
by
Alexandre Julliard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fixed a couple of races with exiting threads in suspend_for_ptrace().
parent
ab615064
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
6 deletions
+6
-6
ptrace.c
server/ptrace.c
+6
-6
No files found.
server/ptrace.c
View file @
fcbd0da4
...
...
@@ -135,7 +135,7 @@ void sigchld_callback(void)
}
/* wait for a ptraced child to get a certain signal */
static
void
wait4_thread
(
struct
thread
*
thread
,
int
signal
)
static
int
wait4_thread
(
struct
thread
*
thread
,
int
signal
)
{
int
res
,
status
;
...
...
@@ -150,10 +150,11 @@ static void wait4_thread( struct thread *thread, int signal )
thread
->
attached
=
0
;
}
else
perror
(
"wait4"
);
return
;
return
0
;
}
res
=
handle_child_status
(
thread
,
res
,
status
,
signal
);
}
while
(
res
&&
res
!=
signal
);
return
(
thread
->
unix_pid
!=
-
1
);
}
/* return the Unix pid to use in ptrace calls for a given thread */
...
...
@@ -199,8 +200,7 @@ static int attach_thread( struct thread *thread )
}
if
(
debug_level
)
fprintf
(
stderr
,
"%04x: *attached*
\n
"
,
thread
->
id
);
thread
->
attached
=
1
;
wait4_thread
(
thread
,
SIGSTOP
);
return
1
;
return
wait4_thread
(
thread
,
SIGSTOP
);
}
/* detach from a Unix thread and kill it */
...
...
@@ -260,8 +260,8 @@ int suspend_for_ptrace( struct thread *thread )
if
(
thread
->
attached
)
{
send_thread_signal
(
thread
,
SIGSTOP
)
;
wait4_thread
(
thread
,
SIGSTOP
)
;
if
(
!
send_thread_signal
(
thread
,
SIGSTOP
))
goto
error
;
if
(
!
wait4_thread
(
thread
,
SIGSTOP
))
goto
error
;
return
1
;
}
if
(
attach_thread
(
thread
))
return
1
;
...
...
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