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

Geoffroy Couprie geo.couprie at gmail.com
Wed Oct 15 00:40:48 CEST 2008


On Sun, Oct 12, 2008 at 7:10 PM, Edouard Gomez <edouard.gomez at gmail.com> wrote:
> 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.
>
> #ifdef FD_CLOEXEC
> fcntl (fd, F_SETFD, fcntl (fd, F_GETFD) | FD_CLOEXEC);
> #endif
>
> Any other idea how to fix win32 build ?
>
Already fixed in 68d84670dccbe61605676160a27c5042c12cd543.



More information about the vlc-devel mailing list