[vlc-devel] commit: Set close-on-exec file for file inputs ( Rémi Denis-Courmont )

Edouard Gomez edouard.gomez at gmail.com
Sun Oct 12 19:10:10 CEST 2008

git version control (git at videolan.org) wrote:
> diff --git a/modules/access/file.c b/modules/access/file.c
> index 1151c4d..f2154b3 100644
> --- a/modules/access/file.c
> +++ b/modules/access/file.c
> @@ -380,6 +380,7 @@ static int open_file (access_t *p_access, const char *path)
>                          _("VLC could not open the file \"%s\"."), path);
>          return -1;
>      }
> +    fcntl (fd, F_SETFD, fcntl (fd, F_GETFD) | FD_CLOEXEC);

breaks win32 build whih has no fcntl function not the flags used in the call.

win32 has no fork so far, so leaking by forking isn't that possible on win32.
Maybe skipping the call with an ifdef would be enough.

fcntl (fd, F_SETFD, fcntl (fd, F_GETFD) | FD_CLOEXEC);

Any other idea how to fix win32 build ?

Edouard Gomez

More information about the vlc-devel mailing list