[MPlayer-users] /dev/dsp not closed?

D Richard Felker III dalias at aerifal.cx
Thu Sep 5 20:41:02 CEST 2002

On Thu, Sep 05, 2002 at 12:27:15PM +0200, Arpi wrote:
> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
> > > actually we need a better way to stop/restart xscreensaver than the current
> > > hack, but unfortunatelly teh xscreensaver author doesn't support any
> > > acceptable method to control his mess. he wants the video players to run a
> > > dedicated thread just to 'ping' the screensaver by executing a shell comamnd
> > > every minute. we cannot accept this method and he doesn't accept others.
> > 
> > Could we just add close-on-exec flag to the dsp file descriptor as a
> > stupid workaround for now?
> is it portable?
> yes, we should do that for all fd's.

AFAIK yes. It could certainly be detected by configure anyway.

man fcntl for info...

> does it have effect on fork() too?
> (-cache uses fork)

Nope, just exec*.

Another option which is sort of a hack, but would work... Instead of
using system to start xscreensaver, fork and exec it manually, but
before the exec do something like:

for (i=3;i<1000;i++) close(i):



More information about the MPlayer-users mailing list