From: Werner Van Belle <werner@yellowcouch.org>
To: alsa-devel@alsa-project.org
Subject: Closing alsa devices after forking off children
Date: Fri, 27 Mar 2009 17:13:24 +0100 [thread overview]
Message-ID: <49CCFB24.5020100@yellowcouch.org> (raw)
[-- 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
reply other threads:[~2009-03-27 16:12 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=49CCFB24.5020100@yellowcouch.org \
--to=werner@yellowcouch.org \
--cc=alsa-devel@alsa-project.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.