diff libao2/ao_oss.c @ 8303:322f1a91a5e7

avoid giving a /dev/dsp fd to child processes!! (menu exec, xscreensaver nonsense, etc) other parts of mplayer should be fixed like this as well!
author rfelker
date Thu, 28 Nov 2002 16:14:08 +0000
parents b9da278e4c92
children 2dcdd2ae333f
line wrap: on
line diff
--- a/libao2/ao_oss.c	Thu Nov 28 00:44:24 2002 +0000
+++ b/libao2/ao_oss.c	Thu Nov 28 16:14:08 2002 +0000
@@ -121,6 +121,10 @@
    return 0;
   }  
 #endif
+
+#if defined(FD_CLOEXEC) && defined(F_SETFD)
+  fcntl(audio_fd, F_SETFD, FD_CLOEXEC);
+#endif
   
   ao_data.bps=channels;
   if(format != AFMT_U8 && format != AFMT_S8)