diff options
author | Pierre Ossman <ossman@cendio.se> | 2006-05-22 15:20:46 +0000 |
---|---|---|
committer | Pierre Ossman <ossman@cendio.se> | 2006-05-22 15:20:46 +0000 |
commit | 4e3dc7ce68561c16254712d713b2ccd472b8afe7 (patch) | |
tree | 2b0494e14605f3f3e133765126eaee3c77c8b482 /src/polyp/context.c | |
parent | bf09399d0e84c43fbae3d24b5c71dc8d85b62fe7 (diff) |
Wrap strerror() in a function that makes it thread safe and converts the
output to UTF-8.
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@945 fefdeb5f-60dc-0310-8127-8f9354f1896f
Diffstat (limited to 'src/polyp/context.c')
-rw-r--r-- | src/polyp/context.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/polyp/context.c b/src/polyp/context.c index a3b49d4b..eb563819 100644 --- a/src/polyp/context.c +++ b/src/polyp/context.c @@ -47,6 +47,7 @@ #include "../polypcore/winsock.h" +#include <polyp/error.h> #include <polyp/version.h> #include <polyp/xmalloc.h> @@ -440,7 +441,7 @@ static int context_connect_spawn(pa_context *c) { pa_context_ref(c); if (socketpair(AF_UNIX, SOCK_STREAM, 0, fds) < 0) { - pa_log(__FILE__": socketpair() failed: %s", strerror(errno)); + pa_log(__FILE__": socketpair(): %s", pa_cstrerror(errno)); pa_context_fail(c, PA_ERR_INTERNAL); goto fail; } @@ -454,7 +455,7 @@ static int context_connect_spawn(pa_context *c) { c->spawn_api.prefork(); if ((pid = fork()) < 0) { - pa_log(__FILE__": fork() failed: %s", strerror(errno)); + pa_log(__FILE__": fork(): %s", pa_cstrerror(errno)); pa_context_fail(c, PA_ERR_INTERNAL); if (c->spawn_api.postfork) @@ -510,7 +511,7 @@ static int context_connect_spawn(pa_context *c) { c->spawn_api.postfork(); if (r < 0) { - pa_log(__FILE__": waitpid() failed: %s", strerror(errno)); + pa_log(__FILE__": waitpid(): %s", pa_cstrerror(errno)); pa_context_fail(c, PA_ERR_INTERNAL); goto fail; } else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) { |