diff options
| author | Lennart Poettering <lennart@poettering.net> | 2009-07-25 01:29:36 +0200 | 
|---|---|---|
| committer | Lennart Poettering <lennart@poettering.net> | 2009-07-25 01:29:36 +0200 | 
| commit | 6ce7d208f066f02ee837686e81faa1463a5e2945 (patch) | |
| tree | 2f062cc6f235b41ab903b1e6e594e6073d998834 | |
| parent | 59659e1db64d2a88787943da75cf6c510d0ad98f (diff) | |
client: if a child we created was already reaped, assume that it was successful
| -rw-r--r-- | src/pulse/context.c | 13 | 
1 files changed, 10 insertions, 3 deletions
| diff --git a/src/pulse/context.c b/src/pulse/context.c index ab1c1638..7ba33249 100644 --- a/src/pulse/context.c +++ b/src/pulse/context.c @@ -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; | 
