HomePhabricator

[clang-tidy] Refactor the code and add a close-on-exec check on memfd_create()…

Description

[clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.

Summary:

  1. Refactor the structure of the code by adding a base class for all close-on-exec checks, which implements most of the needed functions.
  2. memfd_create() is better to set MFD_CLOEXEC flag to avoid file descriptor leakage.

Reviewers: alexfh, aaron.ballman, hokein

Reviewed By: alexfh, hokein

Subscribers: Eugene.Zelenko, chh, cfe-commits, srhines, mgorny, JDevlieghere, xazax.hun

Tags: #clang-tools-extra

Differential Revision: https://reviews.llvm.org/D35372

Details

Committed
yawanngAug 10 2017, 10:18 AM
Reviewer
alexfh
Differential Revision
D35372: [clang-tidy] Refactor the code and add a close-on-exec check on memfd_create() in Android module.
Parents
rL310629: Merging r308847:
Branches
Unknown
Tags
Unknown