Commit ad28fe35 authored by Michael Niedermayer's avatar Michael Niedermayer

avutil/file_open: Print debug message if setting close on exec fails

Fixes CID1087079
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 88d4ff4b
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment