• Nick Kralevich's avatar
    libc_logging: Set SOCK_CLOEXEC on socket · bae5b1db
    Nick Kralevich authored
    Socket file descriptors remain open across exec unless
    SOCK_CLOEXEC is set. Enable this option, to avoid leaking
    file descriptors.
    
    In practice, this isn't a big deal, since the socket only remains
    open for a very short period to write a message. However, this
    socket might leak for for multithreaded programs if an exec occurs
    between the open and close.
    
    Change-Id: Ica2e71fe28657c32d56de1431c8f7f1f5c7b7c58
    bae5b1db
libc_logging.cpp 18.1 KB