• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1.. title:: clang-tidy - android-cloexec-creat
2
3android-cloexec-creat
4=====================
5
6The usage of ``creat()`` is not recommended, it's better to use ``open()``.
7
8Examples:
9
10.. code-block:: c++
11
12  int fd = creat(path, mode);
13
14  // becomes
15
16  int fd = open(path, O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, mode);
17