[alsa-devel] Closing alsa devices after forking off children
Werner Van Belle
werner at yellowcouch.org
Fri Mar 27 17:13:24 CET 2009
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/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 260 bytes
Desc: OpenPGP digital signature
Url : http://mailman.alsa-project.org/pipermail/alsa-devel/attachments/20090327/f67aca2d/attachment.sig
More information about the Alsa-devel
mailing list