Index: libvo/x11_common.c =================================================================== RCS file: /cvsroot/mplayer/main/libvo/x11_common.c,v retrieving revision 1.101 diff -u -r1.101 x11_common.c --- libvo/x11_common.c 29 Sep 2002 04:18:53 -0000 1.101 +++ libvo/x11_common.c 29 Sep 2002 09:09:56 -0000 @@ -12,6 +12,7 @@ #include #include #include +#include #include "video_out.h" @@ -769,7 +770,23 @@ } if (xscreensaver_was_running && stop_xscreensaver) - system("xscreensaver -no-splash &"); + { + if (0 == fork()) + { + struct rlimit rlim; + int i; + + /* + * Close all filedescriptors so that xscreensaver does not + * keep a lock on any device like the sound device. + */ + getrlimit(RLIMIT_NOFILE, &rlim); + for (i=0; i < rlim.rlim_cur; i++) + (void)close(i); + execlp("xscreensaver", "xscreensaver", "-no-splash", NULL); + exit(1); + } + } }