[alsa-devel] How to close ALSA device nodes? / ALSA's fds
rem at videolan.org
Sat Oct 24 16:37:00 CEST 2009
Le vendredi 23 octobre 2009 21:51:45 Daniel Yek, vous avez écrit :
> [Branch the thread for a separate suggestion...]
> Rémi Denis-Courmont wrote:
> > Le dimanche 18 octobre 2009 20:13:15 Robert Hancock, vous avez écrit :
> >>> From the earlier thread, I reckon that ALSA developers consider that
> >>> this
> >>> is an upper-layer issue. Maybe so, but then how is the upper-layer
> >>> supposed to find which file descriptors ALSA-lib has opened - if any?
> >>> Conversely, if ALSA- lib won't tell while file descriptors it is using,
> >>> what could possibly be the use case for not closing those on exec?
> >> I agree that it's a difficult problem for an app that wants to fork
> >> and exec another process.. I'd think really should be some way for an
> >> app to control the CLOEXEC flag for the file descriptors that alsa-lib
> >> has open..
> > <snip>
> > That said, I still fail to see any potential use case to not set the
> > flag.
> > Since ALSA-lib won't let the application know about the file handles, any
> > application cannot a use them across exec() in the first place.
> Is snd_pcm_poll_descriptors() adequate for this particular issue?
That tells the application what descriptors to poll for ALSA to use. That does
not tell what the descriptors do. So re-using those descriptors across exec()
would be very far-fetched.
More information about the Alsa-devel