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

Fixes CID1087079
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
pull/40/head
Michael Niedermayer 12 years ago
parent 88d4ff4b5f
commit ad28fe35c5
  1. 6
      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;

Loading…
Cancel
Save