diff options
author | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-13 21:04:15 +0000 |
---|---|---|
committer | alex <alex@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2003-08-13 21:04:15 +0000 |
commit | c0298b66cd5ac06f7036aae6b2ad4972dfaed5c8 (patch) | |
tree | 5821e43cab30be06ccfa663679f4ecc489663e61 | |
parent | fe025d13cc74b117561b89aa45d7372c3f91d252 (diff) |
Set close-on-exec after newer open (in reset func). Patch by Andriy Gapon <agapon@cv-nj.com>
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@10601 b3059339-0415-0410-9bf9-f77b7e298cf2
-rw-r--r-- | libao2/ao_oss.c | 4 |
1 files changed, 4 insertions, 0 deletions
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) |