1 .. title:: clang-tidy - android-cloexec-socket
6 ``socket()`` should include ``SOCK_CLOEXEC`` in its type argument to avoid the
7 file descriptor leakage. Without this flag, an opened sensitive file would
8 remain open across a fork+exec to a lower-privileged SELinux domain.
14 socket(domain, type, SOCK_STREAM);
18 socket(domain, type, SOCK_STREAM | SOCK_CLOEXEC);