From c0298b66cd5ac06f7036aae6b2ad4972dfaed5c8 Mon Sep 17 00:00:00 2001 From: alex Date: Wed, 13 Aug 2003 21:04:15 +0000 Subject: [PATCH] Set close-on-exec after newer open (in reset func). Patch by Andriy Gapon git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10601 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 28211df0de..4cd98d9d5e 100644 --- a/libao2/ao_oss.c +++ b/libao2/ao_oss.c @@ -248,6 +248,10 @@ static void reset(){ return; } +#if defined(FD_CLOEXEC) && defined(F_SETFD) + fcntl(audio_fd, F_SETFD, FD_CLOEXEC); +#endif + ioctl (audio_fd, SNDCTL_DSP_SETFMT, &ao_data.format); if(ao_data.format != AFMT_AC3) { if (ao_data.channels > 2)