Hello.
My program call snd_pcm_open() with "plug:dmix" in thread.
Function snd_pcm_direct_server_create() hangs on waitpid() if exit() is used,
and server_job process keeps alive after program exit.
This trivial patch chages exit() to _exit() in file pcm_direct.c. In this case
all works ok for me.
Best regards, Konstantin Stepaniuk.
--- pcm_direct.c.orig 2003-07-30 20:01:34.000000000 +0400
+++ pcm_direct.c 2003-07-30 20:02:06.000000000 +0400
@@ -284,7 +284,7 @@
snd_pcm_direct_shm_discard(dmix);
snd_pcm_direct_semaphore_discard(dmix);
server_printf("DIRECT SERVER EXIT\n");
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
}
int snd_pcm_direct_server_create(snd_pcm_direct_t *dmix)
@@ -316,7 +316,7 @@
ret = fork();
if (ret == 0)
server_job(dmix);
- exit(EXIT_SUCCESS);
+ _exit(EXIT_SUCCESS);
} else {
waitpid(ret, NULL, 0);
}