Home
last modified time | relevance | path

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

12345678

/linux/tools/testing/selftests/landlock/
H A Dbase_test.c227 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
250 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
284 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
295 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
404 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC);
432 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC));
434 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
444 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
447 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
467 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC);
[all...]
H A Dscoped_signal_test.c91 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
188 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
189 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
277 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST()
302 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC));
354 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in FIXTURE_VARIANT_ADD()
468 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
469 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
H A Dptrace_test.c57 fd = open(procenv_path, O_RDONLY | O_CLOEXEC); in test_ptrace_read()
169 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
170 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
359 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
360 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
H A Dscoped_abstract_unix_test.c88 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
185 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
186 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
316 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
317 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
426 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
441 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
645 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
646 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
811 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
[all...]
H A Dfs_test.c436 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel()
490 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
493 ruleset_fd = open(dir_s1d1, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
501 ruleset_fd = open(dir_s1d1, O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
518 path_beneath.parent_fd = open(dir_s1d2, O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
532 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
615 path_beneath_file.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC); in TEST_F_FORK()
620 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
673 open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
700 path_beneath.parent_fd = open(file1_s1d2, O_PATH | O_CLOEXEC); in TEST_F_FORK()
[all...]
/linux/tools/perf/util/
H A Dutil.h73 #ifndef O_CLOEXEC
75 #define O_CLOEXEC 0x400000
77 #define O_CLOEXEC 010000000
79 #define O_CLOEXEC 02000000
76 #define O_CLOEXEC global() macro
78 #define O_CLOEXEC global() macro
80 #define O_CLOEXEC global() macro
/linux/tools/testing/selftests/pid_namespace/
H A Dpid_max.c57 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_cb()
103 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_inner()
178 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_outer()
247 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_limit_inner()
304 fd = open("/proc/sys/kernel/pid_max", O_RDWR | O_CLOEXEC | O_NOCTTY); in pid_max_nested_limit_outer()
/linux/tools/testing/selftests/filesystems/binderfs/
H A Dbinderfs_test.c92 fd = open(device_path, O_RDONLY | O_CLOEXEC); in __do_binderfs_test()
115 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test()
162 fd = open(device_path, O_CLOEXEC | O_RDONLY); in __do_binderfs_test()
258 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping()
283 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOFOLLOW); in write_id_mapping()
425 fd = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
442 fds[i] = open(device_path, O_RDONLY | O_CLOEXEC); in TEST()
/linux/tools/testing/selftests/filesystems/
H A Dkernfs_test.c18 fd = open("/sys/kernel/warn_count", O_RDONLY | O_CLOEXEC); in TEST()
30 fd = open("/sys/kernel/warn_count", O_RDONLY | O_CLOEXEC); in TEST()
H A Dutils.c193 setgroups_fd = open(path, O_WRONLY | O_CLOEXEC); in write_id_mapping()
212 fd = open(path, O_WRONLY | O_CLOEXEC); in write_id_mapping()
300 ret = open(path_ns, O_RDONLY | O_CLOEXEC | O_NOCTTY); in get_userns_fd_from_idmap()
430 fd_userns = open(path, O_RDONLY | O_CLOEXEC); in create_userns_hierarchy()
/linux/tools/testing/selftests/proc/
H A Dproc-pidns.c34 int fd = open(path, O_WRONLY|O_CREAT|O_CLOEXEC, 0644); in touch()
49 self->host_mntns = open("/proc/self/ns/mnt", O_RDONLY|O_CLOEXEC); in FIXTURE_SETUP()
70 self->host_pidns = open("/proc/self/ns/pid", O_RDONLY|O_CLOEXEC); in FIXTURE_SETUP()
90 self->dummy_pidns = open("/tmp/dummy/pidns", O_RDONLY|O_CLOEXEC); in FIXTURE_SETUP()
/linux/tools/testing/selftests/pidfd/
H A Dpidfd_test.c104 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_simple_success()
168 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_exited_fail()
272 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
301 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
408 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_syscall_support()
H A Dpidfd_setns_test.c82 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens()
106 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP()
119 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
269 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
282 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
295 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
365 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()
H A Dpidfd_bind_mount.c77 pidfd = open(proc_path, O_RDONLY | O_NOCTTY | O_CLOEXEC); in TEST_F()
103 fd_pidfd_mnt = openat(-EBADF, self->template, O_RDONLY | O_NOCTTY | O_CLOEXEC); in TEST_F()
/linux/tools/include/uapi/asm-generic/
H A Dfcntl.h
/linux/include/uapi/asm-generic/
H A Dfcntl.h61 #ifndef O_CLOEXEC
62 #define O_CLOEXEC 02000000 /* set close_on_exec */ macro
/linux/samples/pidfd/
H A Dpidfd-metadata.c58 procfd = open(path, O_DIRECTORY | O_RDONLY | O_CLOEXEC); in pidfd_metadata_fd()
105 statusfd = openat(procfd, "status", O_RDONLY | O_CLOEXEC); in main()
/linux/tools/testing/selftests/core/
H A Dclose_range_test.c47 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
120 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
209 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
637 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST()
649 fd = open(path, O_CREAT | O_RDONLY | O_CLOEXEC, 0600); in TEST()
656 fd = open(path, O_RDONLY | O_CLOEXEC); in TEST()
/linux/tools/testing/selftests/dmabuf-heaps/
H A Ddmabuf-heap.c130 return dmabuf_heap_alloc_fdflags(fd, len, O_RDWR | O_CLOEXEC, flags, in dmabuf_heap_alloc()
297 .fd_flags = O_RDWR | O_CLOEXEC, in dmabuf_heap_alloc_older()
329 .fd_flags = O_RDWR | O_CLOEXEC, in dmabuf_heap_alloc_newer()
385 ~(O_RDWR | O_CLOEXEC), 0, &dmabuf_fd); in test_alloc_errors()
/linux/tools/testing/selftests/exec/
H A Dcheck-exec.c164 self->pipefd = open(procfd_path, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP()
186 fd_in = open(binary_path, O_CLOEXEC | O_RDONLY); in fill_exec_fd()
208 fd_out = open(path, O_CLOEXEC | O_WRONLY); in fill_exec_path()
250 int flags = O_CLOEXEC; in test_exec_path()
/linux/io_uring/
H A Dopenclose.c76 if (open->file_slot && (open->how.flags & O_CLOEXEC)) in __io_openat_prep()
298 ifi->o_flags = O_CLOEXEC; in io_install_fixed_fd_prep()
335 if (p->flags & ~(O_CLOEXEC | O_NONBLOCK | O_DIRECT | O_NOTIFICATION_PIPE)) in io_pipe_prep()
352 if (p->flags & O_CLOEXEC) in io_pipe_fixed()
/linux/tools/testing/selftests/mount_setattr/
H A Dmount_setattr_test.c166 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW); in write_file()
419 fd = creat(NOSYMFOLLOW_TARGET, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP()
626 fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777); in TEST_F()
675 fd = open("/mnt/A/AA/B/b", O_RDWR | O_CLOEXEC | O_CREAT | O_EXCL, 0777); in TEST_F()
705 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F()
981 fd = open("/mnt/A", O_DIRECTORY | O_CLOEXEC); in TEST_F()
1109 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST_F()
1138 attr.userns_fd = open("/proc/1/ns/user", O_RDONLY | O_CLOEXEC); in TEST_F()
1220 ret = open(path, O_RDONLY | O_CLOEXEC); in get_userns_fd()
1477 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F()
[all …]
/linux/tools/testing/selftests/drivers/ntsync/
H A Dntsync.c150 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
234 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
385 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
450 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
510 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
622 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
757 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
950 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
1073 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
1184 fd = open("/dev/ntsync", O_CLOEXEC | O_RDONLY); in TEST()
[all …]
/linux/include/uapi/linux/
H A Deventfd.h8 #define EFD_CLOEXEC O_CLOEXEC
H A Dtimerfd.h32 #define TFD_CLOEXEC O_CLOEXEC

12345678