How to close ALSA device nodes?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



	Hello,

I'm getting a bug report against VLC media player whereby ALSA sound output 
stops working when the screensaver is inhibited. It turns out that VLC is 
leaking any file descriptor open through ALSA-lib into child processes. The 
exact same issue was already raised by mplayer... 6 years ago:
http://www.mail-archive.com/alsa-devel@xxxxxxxxxxxxxxxxxxxxx/msg06249.html

In other cases (V4L, OSS, DVB, DVD, sockets, even regular files...), VLC would 
open the device nodes with O_CLOEXEC flag (if supported by kernel and libc) 
and fallback to setting FD_CLOEXEC via fcntl(). Then the descriptor is 
automatically, and in the earlier case, thread-safely, closed whenever VLC -
forks and- execs. With ALSA-lib, I cannot figure any way to achieve that...

>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?

Best regards,

-- 
Rémi Denis-Courmont
http://www.remlab.net/
_______________________________________________
Alsa-devel mailing list
Alsa-devel@xxxxxxxxxxxxxxxx
http://mailman.alsa-project.org/mailman/listinfo/alsa-devel


[Index of Archives]     [ALSA User]     [Linux Audio Users]     [Kernel Archive]     [Asterisk PBX]     [Photo Sharing]     [Linux Sound]     [Video 4 Linux]     [Gimp]     [Yosemite News]

  Powered by Linux