mirror of
https://github.com/librempeg/librempeg
synced 2024-11-22 18:49:58 +00:00
avutil/file_open: Print debug message if setting close on exec fails
Fixes CID1087079 Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
parent
88d4ff4b5f
commit
ad28fe35c5
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user