Home
last modified time | relevance | path

Searched refs:O_CLOEXEC (Results 1 – 25 of 48) sorted by relevance

12

/frameworks/base/tools/aapt2/io/
DFileStream.cpp31 #define O_CLOEXEC O_NOINHERIT macro
42 int mode = O_RDONLY | O_CLOEXEC | O_BINARY; in FileInputStream()
113 int mode = O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_BINARY; in FileOutputStream()
/frameworks/base/services/core/jni/
Dcom_android_server_security_VerityUtils.cpp43 ::android::base::unique_fd rfd(open(path, O_RDONLY | O_CLOEXEC)); in enableFsverity()
72 ::android::base::unique_fd rfd(open(path, O_RDONLY | O_CLOEXEC)); in measureFsverity()
Dcom_android_server_SystemServer.cpp94 int fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in get_current_max_fd()
/frameworks/base/cmds/incidentd/tests/
DProtoFileReader_test.cpp62 unique_fd fd(open(testFile.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR)); in TEST()
74 int fd = open(testFile.c_str(), O_RDONLY | O_CLOEXEC); in TEST()
DFdBuffer_test.cpp238 unique_fd fd(open(testFile.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F()
272 unique_fd fd(open(testFile.c_str(), O_RDONLY | O_CLOEXEC)); in TEST_F()
/frameworks/base/cmds/statsd/src/storage/
DStorageManager.cpp104 int fd = open(file, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR); in writeFile()
132 int fd = open(TRAIN_INFO_PATH, O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR); in writeTrainInfo()
222 int fd = open(TRAIN_INFO_PATH, O_RDONLY | O_CLOEXEC); in readTrainInfo()
429 int fd = open(fullPathName.c_str(), O_RDONLY | O_CLOEXEC); in appendConfigMetricsReport()
456 int fd = open(file, O_RDONLY | O_CLOEXEC); in readFileToString()
486 int fd = open(file_name.c_str(), O_RDONLY | O_CLOEXEC); in readConfigFromDisk()
529 O_RDONLY | O_CLOEXEC); in readConfigFromDisk()
/frameworks/base/cmds/statsd/tests/storage/
DStorageManager_test.cpp136 open(file1.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR))); in prepareLocalHistoryTestFiles()
144 open(file2.c_str(), O_WRONLY | O_CREAT | O_CLOEXEC, S_IRUSR | S_IWUSR))); in prepareLocalHistoryTestFiles()
161 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(name.c_str(), O_RDONLY | O_CLOEXEC))); in fileExist()
/frameworks/base/core/jni/
Dcom_android_internal_os_AtomicDirectory.cpp34 if ((fd = TEMP_FAILURE_RETRY(open(path8.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC))) == -1) { in com_android_internal_os_AtomicDirectory_getDirectoryFd()
Dfd_utils.cpp379 int dup_flags = (fd_flags & FD_CLOEXEC) ? O_CLOEXEC : 0; in ReopenOrDetach()
460 const int dev_null_fd = open("/dev/null", O_RDWR | O_CLOEXEC); in DetachSocket()
465 if (dup3(dev_null_fd, fd, O_CLOEXEC) == -1) { in DetachSocket()
Dandroid_ddm_DdmHandleNativeHeap.cpp55 int fd = open(path, O_RDONLY | O_CLOEXEC); in ReadFile()
Dandroid_text_Hyphenator.cpp41 const int fd = open(hyFilePath.c_str(), O_RDONLY | O_CLOEXEC); in mmapPatternFile()
Dandroid_util_Process.cpp231 fd = open(proc_path, O_RDONLY | O_CLOEXEC); in android_os_Process_setProcessGroup()
571 int fd = open(text, O_WRONLY | O_CLOEXEC); in android_os_Process_setSwappiness()
701 int fd = open(file.string(), O_RDONLY | O_CLOEXEC); in android_os_Process_readProcLines()
1013 int fd = open(file8, O_RDONLY | O_CLOEXEC); in android_os_Process_readProcFile()
1185 int fd = open(path, O_RDONLY | O_CLOEXEC); in android_os_Process_getPidsForCommands()
/frameworks/native/cmds/installd/
Dview_compiler.cpp56 unique_fd outfd{open(out_dex_file, O_CREAT | O_TRUNC | O_WRONLY | O_CLOEXEC, 0644)}; in view_compiler()
Dutils.cpp510 subfd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); in _delete_dir_contents()
606 fd = openat(dfd, name, O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC); in delete_dir_contents_fd()
656 int fsfd = openat(sdfd, name, O_RDONLY | O_NOFOLLOW | O_CLOEXEC); in _copy_dir_files()
657 int fdfd = openat(ddfd, name, O_WRONLY | O_NOFOLLOW | O_CLOEXEC | O_CREAT, 0600); in _copy_dir_files()
1148 O_RDONLY | O_DIRECTORY | O_NOFOLLOW | O_CLOEXEC)); in collect_profiles()
/frameworks/base/core/java/android/os/
DParcelFileDescriptor.java22 import static android.system.OsConstants.O_CLOEXEC;
305 final int flags = FileUtils.translateModePfdToPosix(mode) | ifAtLeastQ(O_CLOEXEC); in openInternal()
468 final FileDescriptor[] fds = Os.pipe2(ifAtLeastQ(O_CLOEXEC)); in createPipe()
490 final FileDescriptor[] fds = Os.pipe2(ifAtLeastQ(O_CLOEXEC)); in createReliablePipe()
/frameworks/base/cmds/statsd/src/external/
DPerfetto.cpp86 int devNullFd = open("/dev/null", O_RDWR | O_CLOEXEC); in CollectPerfettoTraceAndUploadToDropbox()
/frameworks/native/cmds/dumpstate/
Ddumpstate.cpp208 return Open(path, O_RDONLY | O_CLOEXEC | O_NOFOLLOW); in OpenForRead()
340 … TEMP_FAILURE_RETRY(open(abs_path.c_str(), O_RDONLY | O_CLOEXEC | O_NOFOLLOW | O_NONBLOCK))); in GetDumpFds()
814 TEMP_FAILURE_RETRY(open(entry_path.c_str(), O_RDONLY | O_NONBLOCK | O_CLOEXEC))); in AddZipEntry()
943 O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NOFOLLOW, in DumpIncidentReport()
1260 O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NOFOLLOW, in DumpHals()
1768 android::base::unique_fd fd(mkostemp(file_name_buf.get(), O_APPEND | O_CLOEXEC)); in DumpTraces()
1908 open(paths[i].c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC | O_NOFOLLOW, in DumpstateBoard()
2052 | O_CLOEXEC | O_NOFOLLOW))); in SHA256_file_hash()
3183 if ((fd = TEMP_FAILURE_RETRY(open(cmdpath, O_RDONLY | O_CLOEXEC))) >= 0) { in __for_each_pid()
3194 if ((fd = TEMP_FAILURE_RETRY(open(cmdpath, O_RDONLY | O_CLOEXEC))) >= 0) { in __for_each_pid()
[all …]
/frameworks/base/cmds/idmap2/tests/
DFileUtilsTests.cpp73 ASSERT_EQ(pipe2(pipefd, O_CLOEXEC), 0); in TEST()
/frameworks/base/cmds/incidentd/src/
DWorkDirectory.cpp75 int fd = open(filename.c_str(), O_RDONLY | O_CLOEXEC); in read_proto()
94 int fd = open(filename.c_str(), O_CREAT | O_TRUNC | O_RDWR | O_CLOEXEC, 0660); in write_proto()
378 mDataFd = open(mDataFileName.c_str(), O_CREAT | O_TRUNC | O_RDWR | O_CLOEXEC, 0660); in startWritingDataFile()
395 int dataFd = open(mDataFileName.c_str(), O_RDONLY | O_CLOEXEC); in startFilteringData()
/frameworks/native/libs/binder/tests/
DbinderDriverInterfaceTest.cpp37 m_binderFd = open(BINDER_DEV_NAME, O_RDWR | O_NONBLOCK | O_CLOEXEC); in SetUp()
153 int binderFd = open(BINDER_DEV_NAME, O_RDWR | O_NONBLOCK | O_CLOEXEC); in TEST_F()
/frameworks/opt/net/wifi/libwifi_hal/
Dwifi_hal_common.cpp59 fd = TEMP_FAILURE_RETRY(open(filename, O_RDONLY | O_CLOEXEC | O_NOFOLLOW)); in insmod()
/frameworks/av/media/libcpustats/
DThreadCpuUsage.cpp230 fd = open(freq_path, O_RDONLY | O_CLOEXEC); in getCpukHz()
/frameworks/base/core/java/com/android/internal/os/
DZygoteConnection.java20 import static android.system.OsConstants.O_CLOEXEC;
221 FileDescriptor[] pipeFds = Os.pipe2(O_CLOEXEC); in processOneCommand()
DZygote.java19 import static android.system.OsConstants.O_CLOEXEC;
532 pipeFDs = Os.pipe2(O_CLOEXEC); in forkUsap()
/frameworks/base/libs/hwui/tests/macrobench/
Dmain.cpp119 int fd = open(buffer, O_WRONLY | O_CLOEXEC); in moveToCpuSet()

12