g_source_remove (state->watch);
close (state->fd);
- waitpid (state->pid, &ret, 0);
+ while (waitpid (state->pid, &ret, 0) == -1 && errno == EINTR)
+ ;
if (WIFSIGNALED (ret) || WEXITSTATUS (ret) != 1)
goto ERROR;
close (state->fd);
/* FIXME: Wait for HUP signal before doing this */
- waitpid (state->pid, NULL, 0);
+ while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR)
+ ;
}
g_hash_table_remove (lookup_hash, state->name);
* Wait for the SIGSTOP from PTRACE_ATTACH to arrive at the
* parent.
*/
- waitpid (getppid (), NULL, WUNTRACED);
+ while (waitpid (getppid (), NULL, WUNTRACED) == -1 && errno == EINTR)
+ ;
if (ptrace (SOUP_PTRACE_DETACH, getppid (), NULL, NULL) == -1)
g_warning ("ptrace: Detach failed: %s",
g_source_remove (state->watch);
close (state->fd);
kill (state->pid, SIGKILL);
- waitpid (state->pid, NULL, 0);
+ while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR)
+ ;
g_free (state);
}
state->data);
close (state->fd);
- waitpid (state->pid, NULL, 0);
+ while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR)
+ ;
g_free (state);
return FALSE;
}
close (state->fd);
kill (state->pid, SIGKILL);
- waitpid (state->pid, NULL, 0);
+ while (waitpid (state->pid, NULL, 0) == -1 && errno == EINTR)
+ ;
g_free(state);
}