From 0ca2d2a80b39bb0190251ffcb9b570d90ac03d90 Mon Sep 17 00:00:00 2001 From: rfelker Date: Thu, 28 Nov 2002 16:14:08 +0000 Subject: [PATCH] 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! git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@8304 b3059339-0415-0410-9bf9-f77b7e298cf2 --- libao2/ao_oss.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/libao2/ao_oss.c b/libao2/ao_oss.c index 2dff9725a2..e090b56f96 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -121,6 +121,10 @@ static int init(int rate,int channels,int format,int flags){ 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)