]> git.sesse.net Git - vlc/commit
utf8_open: set the close-on-exec descriptor flag
authorRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 27 Jan 2009 15:55:34 +0000 (17:55 +0200)
committerRémi Denis-Courmont <rdenis@simphalempin.com>
Tue, 27 Jan 2009 16:06:28 +0000 (18:06 +0200)
commit9f59c6743b8aec7598f2f6145fc417c469a7c9a1
treef6011a69b16e820f96451e23ea53aee030cf3bb1
parent6ce34a21bc23c87c6d4b0b37f798a16ce8bd93d7
utf8_open: set the close-on-exec descriptor flag

This departs from utf8_open() being a pure open() + Unicode function.
We should really always set the flag anyway, so lets factor the code.
There is still a tiny race between open() and the second fcntl() system
call, but it cannot quite be fixed within the current POSIX standards.

By the way, the correct way to clear the flag would be _after_ fork(),
but I am not aware of any such case involving utf8_open() in the
current tree.
src/text/filesystem.c