Commit de1990f4 authored by Alexandre Julliard's avatar Alexandre Julliard

Cope with wait4 being interrupted by a signal.

parent aee989a7
......@@ -139,10 +139,11 @@ static int wait4_thread( struct thread *thread, int signal )
{
int res, status;
do
for (;;)
{
if ((res = wait4_wrapper( get_ptrace_pid(thread), &status, WUNTRACED, NULL )) == -1)
{
if (errno == EINTR) continue;
if (errno == ECHILD) /* must have died */
{
thread->unix_pid = -1;
......@@ -153,7 +154,8 @@ static int wait4_thread( struct thread *thread, int signal )
return 0;
}
res = handle_child_status( thread, res, status, signal );
} while (res && res != signal);
if (!res || res == signal) break;
}
return (thread->unix_pid != -1);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment