changeset 10600:3cf428b56cde

Set close-on-exec after newer open (in reset func). Patch by Andriy Gapon <agapon@cv-nj.com>
author alex
date Wed, 13 Aug 2003 21:04:15 +0000
parents 822b1fa6db25
children 57b5e42f6a35
files libao2/ao_oss.c
diffstat 1 files changed, 4 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/libao2/ao_oss.c	Wed Aug 13 19:02:34 2003 +0000
+++ b/libao2/ao_oss.c	Wed Aug 13 21:04:15 2003 +0000
@@ -248,6 +248,10 @@
 	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)