[MPlayer-dev-eng] [PATCH] Avoid resource lockup by xscreensaver

D Richard Felker III dalias at aerifal.cx
Sun Sep 29 18:03:47 CEST 2002


On Sun, Sep 29, 2002 at 05:45:25PM +0200, Arpi wrote:
> > entirely. (I think cygwin is one such system...) A much better
> > solution is just to set the close-on-exec flag properly on each fd
> > when it is opened.
> agree
> patch?

Patching ao_oss.c would be easy, but alsa seems to use its own stupid
library calls to open sound device and so stuff, rather than open +
ioctl (isn't it the point of having ioctl's on *nix that you *don't*
have to use libraries to access hardware like on windows and other
brain damaged systems?? </alsarant>). So, I'm not sure how easy it is
to fix this across the board. I was planning on committing fixes right
after I posted that message, then I realized it might not work so well
for such broken drivers. There might be similar issues with libdvdread
and/or dvdnav too...

Perhaps alsa provides a way to tell if you want to open the device
with close-on-exec, like the way it handles nonblocking? I have no
intention of installing broken alsa stuff on my system just to check
this out though.

BTW, one other idea....would it be possible to just move the calls to
the xscreensaver mess to somewhere else, so they'll happen before any
files are opened or after all files are closed? This might make things
much easier... Or we could just go back to the idea of sending SIGSTOP
to xscreensaver and SIGCONT to resume. Let's make a decision though --
last time this was discussed, lots of ideas came up, but then no one
decided which one was best so it just stayed broken like it is now.

Rich




More information about the MPlayer-dev-eng mailing list