Home
last modified time | relevance | path

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

12345

/aosp14/system/core/init/
H A Dservice_utils.cpp51 auto fd = unique_fd{open(path, O_RDONLY | O_CLOEXEC)}; in EnterNamespace()
129 auto fd = unique_fd{open("/dev/null", O_RDWR | O_CLOEXEC)}; in SetupStdio()
132 fd.reset(open("/dev/kmsg_debug", O_WRONLY | O_CLOEXEC)); in SetupStdio()
133 if (fd == -1) fd.reset(open("/dev/null", O_WRONLY | O_CLOEXEC)); in SetupStdio()
140 auto fd = unique_fd{open(console.c_str(), O_RDWR | O_CLOEXEC)}; in OpenConsole()
141 if (fd == -1) fd.reset(open("/dev/null", O_RDWR | O_CLOEXEC)); in OpenConsole()
186 unique_fd fd(TEMP_FAILURE_RETRY(open(name.c_str(), flags | O_NONBLOCK | O_CLOEXEC))); in Create()
H A Dpersistent_properties.cpp73 unique_fd fd(openat(dirfd(dir.get()), entry->d_name, O_RDONLY | O_NOFOLLOW | O_CLOEXEC)); in LoadLegacyPersistentProperties()
190 open(temp_filename.c_str(), O_WRONLY | O_CREAT | O_NOFOLLOW | O_TRUNC | O_CLOEXEC, 0600))); in WritePersistentPropertyFile()
215 auto dir_fd = unique_fd{open(dir.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC)}; in WritePersistentPropertyFile()
H A Dfirmware_handler.cpp238 unique_fd loading_fd(open(loading.c_str(), O_WRONLY | O_CLOEXEC)); in ProcessFirmwareEvent()
244 unique_fd data_fd(open(data.c_str(), O_WRONLY | O_CLOEXEC)); in ProcessFirmwareEvent()
253 unique_fd fw_fd(open(file.c_str(), O_RDONLY | O_CLOEXEC)); in ProcessFirmwareEvent()
H A Duevent_listener.cpp132 int fd = openat(dfd, "uevent", O_WRONLY | O_CLOEXEC); in RegenerateUeventsForDir()
150 fd = openat(dfd, de->d_name, O_RDONLY | O_DIRECTORY | O_CLOEXEC); in RegenerateUeventsForDir()
H A Dselinux.cpp354 unique_fd fd(open(res->c_str(), O_RDONLY | O_CLOEXEC | O_BINARY)); in OpenSplitPolicy()
371 unique_fd compiled_sepolicy_fd(mkostemp(compiled_sepolicy, O_CLOEXEC)); in OpenSplitPolicy()
502 policy_file->fd.reset(open(kSepolicyFile, O_RDONLY | O_CLOEXEC | O_NOFOLLOW)); in OpenMonolithicPolicy()
565 open(dstPath.c_str(), O_WRONLY | O_CREAT | O_TRUNC | O_CLOEXEC, S_IRUSR | S_IWUSR))); in PutFileInTmpfs()
582 unique_fd fd(open((dir + kSepolicyZip).c_str(), O_RDONLY | O_BINARY | O_CLOEXEC)); in GetPolicyFromApex()
/aosp14/system/core/fs_mgr/libdm/
H A Dloop_control.cpp36 control_fd_.reset(TEMP_FAILURE_RETRY(open(kLoopControlDevice, O_RDWR | O_CLOEXEC))); in LoopControl()
59 TEMP_FAILURE_RETRY(open(loopdev->c_str(), O_RDWR | O_CLOEXEC))); in Attach()
87 android::base::unique_fd loop_fd(TEMP_FAILURE_RETRY(open(loopdev.c_str(), O_RDWR | O_CLOEXEC))); in Detach()
157 owned_fd_.reset(open(path.c_str(), O_RDWR | O_CLOEXEC)); in LoopDevice()
/aosp14/frameworks/base/core/jni/
H A Dcom_android_internal_security_VerityUtils.cpp64 ::android::base::unique_fd rfd(open(path.c_str(), O_RDONLY | O_CLOEXEC)); in enableFsverity()
85 ::android::base::unique_fd rfd(open(path.c_str(), O_RDONLY | O_CLOEXEC)); in statxForFsverity()
109 ::android::base::unique_fd rfd(open(path.c_str(), O_RDONLY | O_CLOEXEC)); in measureFsverity()
H A Dcom_android_internal_content_F2fsUtils.cpp50 android::base::unique_fd fd(open(filePath.c_str(), O_RDONLY | O_CLOEXEC, 0)); in com_android_internal_content_F2fsUtils_nativeReleaseCompressedBlocks()
H A Dandroid_os_storage_StorageManager.cpp49 TEMP_FAILURE_RETRY(open(utf_chars_path.c_str(), O_RDONLY | O_CLOEXEC))); in android_os_storage_StorageManager_setQuotaProjectId()
/aosp14/frameworks/base/tools/aapt2/io/
H A 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()
/aosp14/system/core/libcutils/
H A Dtrace-dev.cpp33 atrace_marker_fd = open("/sys/kernel/tracing/trace_marker", O_WRONLY | O_CLOEXEC); in atrace_init_once()
35 atrace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_WRONLY | O_CLOEXEC); in atrace_init_once()
H A Dklog.cpp42 return TEMP_FAILURE_RETRY(open(kmsg_device, O_WRONLY | O_CLOEXEC)); in __open_klog()
H A Dtrace-container.cpp90 atrace_marker_fd = open("/sys/kernel/tracing/trace_marker", O_WRONLY | O_CLOEXEC); in atrace_init_once()
93 atrace_marker_fd = open("/sys/kernel/debug/tracing/trace_marker", O_WRONLY | O_CLOEXEC); in atrace_init_once()
H A Dfs.cpp89 : TEMP_FAILURE_RETRY(open(path, O_CREAT | O_CLOEXEC | O_NOFOLLOW | O_RDONLY, 0644)); in fs_prepare_path_impl()
255 if ((next_fd = openat(fd, segment, O_NOFOLLOW | O_CLOEXEC)) == -1) { in fs_mkdirs()
/aosp14/system/core/fs_mgr/liblp/
H A Dimages.cpp62 unique_fd fd = GetControlFileOrOpen(file, O_RDONLY | O_CLOEXEC); in IsEmptySuperImage()
105 unique_fd fd = GetControlFileOrOpen(image_file.c_str(), O_RDONLY | O_CLOEXEC); in ReadFromImageFile()
127 unique_fd fd(open(file.c_str(), O_CREAT | O_RDWR | O_TRUNC | O_CLOEXEC | O_BINARY, 0644)); in WriteToImageFile()
187 unique_fd fd(open(file.c_str(), O_CREAT | O_RDWR | O_TRUNC | O_CLOEXEC | O_BINARY, 0644)); in Export()
211 … static const int kOpenFlags = O_CREAT | O_RDWR | O_TRUNC | O_CLOEXEC | O_NOFOLLOW | O_BINARY; in ExportFiles()
451 unique_fd source_fd = GetControlFileOrOpen(file.c_str(), O_RDONLY | O_CLOEXEC | O_BINARY); in OpenImageFile()
/aosp14/frameworks/base/cmds/incidentd/tests/
H A 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()
/aosp14/system/core/fastboot/device/
H A Dutility.h49 flags |= (O_EXCL | O_CLOEXEC | O_BINARY); in Open()
66 if (fd_.ok() && (flags | O_EXCL | O_CLOEXEC | O_BINARY) == flags_) { in Reset()
/aosp14/system/core/libsuspend/
H A Dautosuspend_wakeup_count.cpp120 int fd = TEMP_FAILURE_RETRY(open(sys_power_state, O_CLOEXEC | O_RDWR)); in init_state_fd()
141 wakeup_count_fd = TEMP_FAILURE_RETRY(open(sys_power_wakeup_count, O_CLOEXEC | O_RDWR)); in autosuspend_init()
/aosp14/system/core/fs_mgr/libfiemap/
H A Dsplit_fiemap_writer.cpp124 unique_fd fd(open(out->list_file_.c_str(), O_CREAT | O_WRONLY | O_CLOEXEC, 0660)); in Create()
250 cursor_fd_.reset(open(file->file_path().c_str(), O_CLOEXEC | O_WRONLY)); in Write()
282 unique_fd fd(open(file->file_path().c_str(), O_RDONLY | O_CLOEXEC)); in Flush()
/aosp14/system/core/debuggerd/
H A Dpbtombstone.cpp44 unique_fd fd(open(argv[1], O_RDONLY | O_CLOEXEC)); in main()
/aosp14/system/core/debuggerd/tombstoned/
H A Dtombstoned.cpp68 result.fd.reset(open("/dev/null", O_WRONLY | O_CLOEXEC)); in devnull()
103 dir_fd_(open(dir_path.c_str(), O_DIRECTORY | O_RDONLY | O_CLOEXEC)), in CrashQueue()
146 result.fd.reset(openat(dir_fd_, ".", O_WRONLY | O_APPEND | O_TMPFILE | O_CLOEXEC, 0660)); in create_temporary_file()
152 O_WRONLY | O_APPEND | O_CREAT | O_TRUNC | O_CLOEXEC, 0660)); in create_temporary_file()
/aosp14/system/core/watchdogd/
H A Dwatchdogd.cpp39 int fd = open(DEV_NAME, O_RDWR | O_CLOEXEC); in main()
/aosp14/system/core/fs_mgr/libfs_avb/
H A Davb_ops.cpp191 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_CLOEXEC))); in GetSizeOfPartition()
212 android::base::unique_fd fd(TEMP_FAILURE_RETRY(open(path.c_str(), O_RDONLY | O_CLOEXEC))); in ReadFromPartition()
/aosp14/system/core/libutils/include/utils/
H A DCompat.h55 #define O_CLOEXEC O_NOINHERIT macro
/aosp14/system/core/fs_mgr/libvbmeta/
H A Dbuilder.cpp62 unique_fd source_fd(TEMP_FAILURE_RETRY(open(file.c_str(), O_RDONLY | O_CLOEXEC))); in ReadVBMetaImageFromFile()
190 open(super_vbmeta_file.c_str(), O_CREAT | O_RDWR | O_TRUNC | O_CLOEXEC, 0644))); in WriteToSuperVBMetaFile()

12345