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)