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.
Showing
Please register or sign in to comment