]> git.sesse.net Git - ffmpeg/blobdiff - libavutil/file_open.c
Merge commit '0e730494160d973400aed8d2addd1f58a0ec883e'
[ffmpeg] / libavutil / file_open.c
index ddb1c513856705ab5d166c000389d24cb8674f64..389076fca164d590975bf91253e901c8f2f8b7d2 100644 (file)
@@ -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;