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

Petr Pajas pajas at ufal.ms.mff.cuni.cz
Thu Sep 5 09:44:02 CEST 2002


D Richard Felker III <dalias at aerifal.cx> writes:
> Could we just add close-on-exec flag to the dsp file descriptor as a
> stupid workaround for now?

This could work but, according to my expirience, it's not only
/dev/dsp, but when playing from CD-ROM it's also /dev/cdrom (cannot be
unmounted then) and it will be any other resource that is still used
by mplayer when it launches xscreensaver. So you would have to go
through all the mplayer's source code and add the flag to every single
open file descriptor. Best of all would be a system call like "exec
without inheriting file descriptors" but i didn't meet such, and i
doubt there is any since the only way to create a new process in unix
is via fork() ...

> Also I like the idea of sending SIGSTOP and SIGCONT to the process...

Yes, this sounds most reasonable.

-- Petr




More information about the MPlayer-users mailing list