Added unlink of the communication socket name.

Added retry when the semaphore is lost (server is going down and removes
the global semaphore). Now the application creates a new direct server
automagically rather than the error return.
This commit is contained in:
Jaroslav Kysela 2003-07-15 19:15:10 +00:00
parent 0811da2a15
commit e03aaa1888
4 changed files with 46 additions and 28 deletions

View file

@ -280,6 +280,7 @@ static void server_job(snd_pcm_direct_t *dmix)
close(dmix->hw_fd);
if (dmix->server_free)
dmix->server_free(dmix);
unlink(dmix->shmptr->socket_name);
snd_pcm_direct_shm_discard(dmix);
snd_pcm_direct_semaphore_discard(dmix);
server_printf("DIRECT SERVER EXIT\n");