mirror of
https://gitlab.freedesktop.org/pulseaudio/pulseaudio.git
synced 2025-10-29 05:40:23 -04:00
fix xmms spawn bug
git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@224 fefdeb5f-60dc-0310-8127-8f9354f1896f
This commit is contained in:
parent
42bba491a8
commit
bb31eda806
2 changed files with 7 additions and 11 deletions
4
doc/todo
4
doc/todo
|
|
@ -1,9 +1,5 @@
|
|||
*** $Id$ ***
|
||||
|
||||
*** 0.5 ***
|
||||
- xmms segfault when daemon not executable
|
||||
- update modinfo
|
||||
|
||||
*** 0.6 ****
|
||||
- per-channel volume
|
||||
- unix socket directories include user name
|
||||
|
|
|
|||
|
|
@ -388,7 +388,6 @@ static int default_server_is_running(void) {
|
|||
|
||||
return 1;
|
||||
}
|
||||
|
||||
static int context_connect_spawn(struct pa_context *c, const struct pa_spawn_api *api) {
|
||||
pid_t pid;
|
||||
int status, r;
|
||||
|
|
@ -421,21 +420,22 @@ static int context_connect_spawn(struct pa_context *c, const struct pa_spawn_api
|
|||
const char *state = NULL;
|
||||
#define MAX_ARGS 64
|
||||
char *argv[MAX_ARGS+1];
|
||||
int n = 0;
|
||||
int n;
|
||||
|
||||
close(fds[0]);
|
||||
|
||||
if (api && api->atfork)
|
||||
api->atfork();
|
||||
|
||||
snprintf(t, sizeof(t), "%s=1", ENV_AUTOSPAWNED);
|
||||
putenv(t);
|
||||
/* Setup argv */
|
||||
|
||||
n = 0;
|
||||
|
||||
argv[n++] = c->conf->daemon_binary;
|
||||
argv[n++] = "--daemonize=yes";
|
||||
|
||||
snprintf(t, sizeof(t), "-Lmodule-native-protocol-fd fd=%i", fds[1]);
|
||||
argv[n++] = t;
|
||||
argv[n++] = strdup(t);
|
||||
|
||||
while (n < MAX_ARGS) {
|
||||
char *a;
|
||||
|
|
@ -449,7 +449,7 @@ static int context_connect_spawn(struct pa_context *c, const struct pa_spawn_api
|
|||
argv[n++] = NULL;
|
||||
|
||||
execv(argv[0], argv);
|
||||
exit(1);
|
||||
_exit(1);
|
||||
}
|
||||
|
||||
/* Parent */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue