summaryrefslogtreecommitdiff
authorMichael Niedermayer <michaelni@gmx.at>2013-10-20 16:36:09 (GMT)
committer Michael Niedermayer <michaelni@gmx.at>2013-10-20 16:36:09 (GMT)
commitad28fe35c55bb0351c8986812f43280430162a12 (patch)
tree30b9e88d1b1a66128c8e94ceb8f9e7a702478a82
parent88d4ff4b5f4c28fe38fa257b1d19b8fede4c35cc (diff)
downloadffmpeg-ad28fe35c55bb0351c8986812f43280430162a12.zip
ffmpeg-ad28fe35c55bb0351c8986812f43280430162a12.tar.gz
ffmpeg-ad28fe35c55bb0351c8986812f43280430162a12.tar.bz2
avutil/file_open: Print debug message if setting close on exec fails
Fixes CID1087079 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat
-rw-r--r--libavutil/file_open.c6
1 files 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;