diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-10-20 18:36:09 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-10-20 18:36:09 +0200 |
commit | ad28fe35c55bb0351c8986812f43280430162a12 (patch) | |
tree | 30b9e88d1b1a66128c8e94ceb8f9e7a702478a82 /libavutil | |
parent | 88d4ff4b5f4c28fe38fa257b1d19b8fede4c35cc (diff) | |
download | ffmpeg-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.c | 6 |
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; |