aboutsummaryrefslogtreecommitdiffstats
path: root/libavutil
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2013-10-20 18:36:09 +0200
committerMichael Niedermayer <michaelni@gmx.at>2013-10-20 18:36:09 +0200
commitad28fe35c55bb0351c8986812f43280430162a12 (patch)
tree30b9e88d1b1a66128c8e94ceb8f9e7a702478a82 /libavutil
parent88d4ff4b5f4c28fe38fa257b1d19b8fede4c35cc (diff)
downloadffmpeg-ad28fe35c55bb0351c8986812f43280430162a12.tar.gz
avutil/file_open: Print debug message if setting close on exec fails
Fixes CID1087079 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavutil')
-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 ddb1c51385..389076fca1 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;