diff --git a/glib/gbacktrace.c b/glib/gbacktrace.c index 8a5cf7076..713065914 100644 --- a/glib/gbacktrace.c +++ b/glib/gbacktrace.c @@ -290,7 +290,13 @@ g_on_error_stack_trace (const gchar *prg_name) while (1) { pid_t retval = waitpid (pid, &status, 0); - if (WIFEXITED (retval) || WIFSIGNALED (retval)) + if (retval == -1) + { + if (errno == EAGAIN || errno == EINTR) + continue; + break; + } + else if (WIFEXITED (status) || WIFSIGNALED (status)) break; } #else