• Rémi Denis-Courmont's avatar
    utf8_open: set the close-on-exec descriptor flag · 9f59c674
    Rémi Denis-Courmont authored
    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.
    9f59c674
filesystem.c 11.2 KB