changeset 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 c7fa49f1de0a
children 2dcdd2ae333f
files libao2/ao_oss.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
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)