All of lore.kernel.org
 help / color / mirror / Atom feed
* Closing alsa devices after forking off children
@ 2009-03-27 16:13 Werner Van Belle
  0 siblings, 0 replies; only message in thread
From: Werner Van Belle @ 2009-03-27 16:13 UTC (permalink / raw)
  To: alsa-devel


[-- Attachment #1.1: Type: text/plain, Size: 857 bytes --]

Hello,

I'm currently trying to figure out why a close of the alsa device is not
realized 'quickly'. That is it seems to take 2 to 3 seconds before I can
reopen the device in anopther program. After observing this behavior
somewhat I figured out that opening an alsa device and then forking off
a process will keep the alsa device open until the child dies, even when
the parent process closes the alsa device.

Is this behavior known and if so how can I work around this ?

I tried to use pthread_atfork to close the device in the forked off
child, but that closes the device in the parent process as well, so I
would rather want to unlink the device in such a way that the close call
does not need to wait until all children have given up their handle.

With kind regards,

-- 
Dr. Werner Van Belle
http://werner.yellowcouch.org/



[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 260 bytes --]

[-- Attachment #2: Type: text/plain, Size: 160 bytes --]

_______________________________________________
Alsa-devel mailing list
Alsa-devel@alsa-project.org
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2009-03-27 16:12 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-03-27 16:13 Closing alsa devices after forking off children Werner Van Belle

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.