diff options
Diffstat (limited to 'libavutil/file_open.c')
-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; |