Hi,

This descriptor is never being closed. I would call this leak harmless
except that it is subsequently inherited by the

"xscreensaver -nosplash" 

process which xine_system() launches just before xine exits. This
means that the xscreensaver process is mysteriously responsible for
locking the mixer kernel modules (ALSA + OSS emulation) into memory...

It is of course possible to guard against this kind of thing happening
using fcntl on file descriptors:

fcntl(fd, F_SETFD, FD_CLOEXEC);

This tells the kernel that this descriptor is to be closed should
another process (e.g. xscreensaver) be exec()'ed. However, in this
case the descriptor being leaked is obviously just a temporary and so
I just closed it myself.

Do you think that xscreensaver could be sitting on any more
descriptors? This possibly explains why my CD-ROM modules wouldn't
unload, but I haven't seen that happen for a while.

Cheers,
Chris


--- xine-lib/src/audio_out/audio_oss_out.c.orig Sun Oct  7 16:51:35 2001
+++ xine-lib/src/audio_out/audio_oss_out.c      Thu Oct 11 17:23:12 2001
@@ -711,7 +711,7 @@
        this->capabilities |= AO_CAP_MUTE_VOL;
       */
       this->capabilities |= AO_CAP_MUTE_VOL;
-      
+      close(mixer_fd);
     }
     else {
       if(strcmp(this->mixer.name, "/dev/mixer")) {

_______________________________________________
Alsa-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/alsa-user

Reply via email to