brintos

brintos / llvm-project-archived public Read only

0
0
Text · 434 B · 58ce05f Raw
19 lines · plain
1.. title:: clang-tidy - android-cloexec-accept2 3android-cloexec-accept4======================5 6The usage of ``accept()`` is not recommended, it's better to use ``accept4()``.7Without this flag, an opened sensitive file descriptor would remain open across8a fork+exec to a lower-privileged SELinux domain.9 10Examples:11 12.. code-block:: c++13 14  accept(sockfd, addr, addrlen);15 16  // becomes17 18  accept4(sockfd, addr, addrlen, SOCK_CLOEXEC);19