]> git.sesse.net Git - vlc/commit
Set close-on-exec file for file inputs
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 11 Oct 2008 17:11:08 +0000 (20:11 +0300)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Sat, 11 Oct 2008 17:11:08 +0000 (20:11 +0300)
commit90ba04f49ebbaccf9efafe93b3975bf18a236418
tree880ad08a68f8ae0cf43c18b4eabf274f469d5986
parente95a471c617ffd3ee00133c29b7878e3069f210a
Set close-on-exec file for file inputs

We don't want to leak descriptors to child PROCESSES (!= threads) such
as the pseudo-CGI interface. The socket wrappers ahve already been doing
that for a while. Unfortunately, there are still many "leaks", through
underlying libraries, opendir(), fopen(), etc. And then, this is not
thread-safe (we leak if another thread calls fork() between open() and
fcntl()). This is a well-known limitation in POSIX anyway.
modules/access/file.c
modules/access/mmap.c