]> code.delx.au - pulseaudio/commitdiff
client: if a child we created was already reaped, assume that it was successful
authorLennart Poettering <lennart@poettering.net>
Fri, 24 Jul 2009 23:29:36 +0000 (01:29 +0200)
committerLennart Poettering <lennart@poettering.net>
Fri, 24 Jul 2009 23:29:36 +0000 (01:29 +0200)
src/pulse/context.c

index ab1c163892f97757f70f0f5592aba02ac0c219c3..7ba33249ebb24fce169c91566272a31e5d3af42d 100644 (file)
@@ -743,9 +743,16 @@ static int context_autospawn(pa_context *c) {
     } while (r < 0 && errno == EINTR);
 
     if (r < 0) {
-        pa_log(_("waitpid(): %s"), pa_cstrerror(errno));
-        pa_context_fail(c, PA_ERR_INTERNAL);
-        goto fail;
+
+        if (errno != ESRCH) {
+            pa_log(_("waitpid(): %s"), pa_cstrerror(errno));
+            pa_context_fail(c, PA_ERR_INTERNAL);
+            goto fail;
+        }
+
+        /* hmm, something already reaped our child, so we assume
+         * startup worked, even if we cannot know */
+
     } else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
         pa_context_fail(c, PA_ERR_CONNECTIONREFUSED);
         goto fail;