[FFmpeg-cvslog] avutil/file_open: Print debug message if setting close on exec fails
Michael Niedermayer
git at videolan.org
Sun Oct 20 18:46:06 CEST 2013
ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sun Oct 20 18:36:09 2013 +0200| [ad28fe35c55bb0351c8986812f43280430162a12] | committer: Michael Niedermayer
avutil/file_open: Print debug message if setting close on exec fails
Fixes CID1087079
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=ad28fe35c55bb0351c8986812f43280430162a12
---
libavutil/file_open.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/libavutil/file_open.c b/libavutil/file_open.c
index ddb1c51..389076f 100644
--- a/libavutil/file_open.c
+++ b/libavutil/file_open.c
@@ -85,8 +85,10 @@ int avpriv_open(const char *filename, int flags, ...)
fd = open(filename, flags, mode);
#if HAVE_FCNTL
- if (fd != -1)
- fcntl(fd, F_SETFD, FD_CLOEXEC);
+ if (fd != -1) {
+ if (fcntl(fd, F_SETFD, FD_CLOEXEC) == -1)
+ av_log(NULL, AV_LOG_DEBUG, "Failed to set close on exec\n");
+ }
#endif
return fd;
More information about the ffmpeg-cvslog
mailing list