[PATCH] D35362: [clang-tidy] Add close-on-exec checks on several functions in Android module.

Yan Wang via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 13 10:29:44 PDT 2017


yawanng created this revision.
yawanng added a project: clang-tools-extra.
Herald added subscribers: xazax.hun, JDevlieghere, mgorny.

accept() is better to be replaced by accept4() with SOCK_CLOEXEC flag to avoid file descriptor leakage.

This is one of a bunch of similar APIs as below and they have very similar structures:


https://reviews.llvm.org/D35362

Files:
  clang-tidy/android/AndroidTidyModule.cpp
  clang-tidy/android/CMakeLists.txt
  clang-tidy/android/CloexecAcceptCheck.cpp
  clang-tidy/android/CloexecAcceptCheck.h
  docs/ReleaseNotes.rst
  docs/clang-tidy/checks/android-cloexec-accept.rst
  docs/clang-tidy/checks/list.rst
  test/clang-tidy/android-cloexec-accept.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D35362.106451.patch
Type: text/x-patch
Size: 7869 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170713/d2d30c9c/attachment.bin>


More information about the cfe-commits mailing list