Home
last modified time | relevance | path

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

1234567

/linux/tools/testing/selftests/landlock/
A Dbase_test.c183 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
206 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
278 open("/tmp", O_PATH | O_NOFOLLOW | O_DIRECTORY | O_CLOEXEC); in TEST()
306 ASSERT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
308 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
318 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
321 dir_fd = open("/tmp", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
341 dir_fd = open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC); in TEST()
354 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
368 EXPECT_EQ(-1, open("/", O_RDONLY | O_DIRECTORY | O_CLOEXEC)); in TEST()
[all …]
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()
276 ASSERT_EQ(0, pipe2(thread_pipe, O_CLOEXEC)); in TEST()
390 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
391 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
A Dptrace_test.c57 fd = open(procenv_path, O_RDONLY | O_CLOEXEC); in test_ptrace_read()
313 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
314 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
A Dscoped_abstract_unix_test.c87 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
184 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
185 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
316 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
331 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
535 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST_F()
536 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
706 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST_F()
889 ASSERT_EQ(0, pipe2(pipe_parent, O_CLOEXEC)); in TEST()
890 ASSERT_EQ(0, pipe2(pipe_child, O_CLOEXEC)); in TEST()
A Dfs_test.c416 fd = openat(dirfd, path, flags | O_CLOEXEC); in test_open_rel()
470 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
512 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
599 open(dir_s1d2, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
652 open(TMP_DIR, O_PATH | O_DIRECTORY | O_CLOEXEC); in TEST_F_FORK()
889 reg_fd = open(file1_s2d2, O_RDWR | O_CLOEXEC); in TEST_F_FORK()
898 reg_fd = open(file1_s2d2, O_RDONLY | O_CLOEXEC); in TEST_F_FORK()
3427 ASSERT_EQ(0, pipe2(pipe_fds, O_CLOEXEC)); in TEST_F_FORK()
3965 fd = open(dir_s1d1, O_PATH | O_CLOEXEC); in TEST_F_FORK()
3984 fd = open(dir_s1d1, O_PATH | O_CLOEXEC); in TEST_F_FORK()
[all …]
/linux/tools/perf/util/
A Dutil.h74 #ifndef O_CLOEXEC
76 #define O_CLOEXEC 0x400000 macro
78 #define O_CLOEXEC 010000000 macro
80 #define O_CLOEXEC 02000000 macro
/linux/tools/testing/selftests/filesystems/binderfs/
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/pidfd/
A Dpidfd_test.c69 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_simple_success()
116 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_exited_fail()
220 pidfd = open(buf, O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
249 ret = pipe2(pipe_fds, O_CLOEXEC); in test_pidfd_send_signal_recycled_pid_fail()
356 pidfd = open("/proc/self", O_DIRECTORY | O_CLOEXEC); in test_pidfd_send_signal_syscall_support()
A Dpidfd_setns_test.c144 fd = open("/proc/self/ns/time_for_children", O_RDONLY | O_CLOEXEC); in switch_timens()
190 proc_fd = open("/proc/self/ns", O_DIRECTORY | O_CLOEXEC); in FIXTURE_SETUP()
203 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
353 self->nsfds[i] = openat(proc_fd, info->name, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
366 self->child_nsfds1[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
379 self->child_nsfds2[i] = open(p, O_RDONLY | O_CLOEXEC); in FIXTURE_SETUP()
449 return open(path, O_RDONLY | O_CLOEXEC); in preserve_ns()
/linux/include/uapi/asm-generic/
A Dfcntl.h62 #ifndef O_CLOEXEC
63 #define O_CLOEXEC 02000000 /* set close_on_exec */ macro
/linux/tools/testing/selftests/mount_setattr/
A Dmount_setattr_test.c148 #define OPEN_TREE_CLOEXEC O_CLOEXEC
176 fd = open(path, O_WRONLY | O_CLOEXEC | O_NOCTTY | O_NOFOLLOW); in write_file()
425 fd = creat(NOSYMFOLLOW_TARGET, O_RDWR | O_CLOEXEC); in FIXTURE_SETUP()
711 dfd = open("/mnt/A/AA/B", O_DIRECTORY | O_CLOEXEC); in TEST_F()
987 fd = open("/mnt/A", O_DIRECTORY | O_CLOEXEC); in TEST_F()
1115 fd = open("/dev/null", O_RDONLY | O_CLOEXEC); in TEST_F()
1144 attr.userns_fd = open("/proc/1/ns/user", O_RDONLY | O_CLOEXEC); in TEST_F()
1226 ret = open(path, O_RDONLY | O_CLOEXEC); in get_userns_fd()
1458 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F()
1482 fd = open(NOSYMFOLLOW_SYMLINK, O_RDWR | O_CLOEXEC); in TEST_F()
[all …]
/linux/samples/pidfd/
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/mm/
A Dsecretmem.c239 BUILD_BUG_ON(SECRETMEM_FLAGS_MASK & O_CLOEXEC); in SYSCALL_DEFINE1()
244 if (flags & ~(SECRETMEM_FLAGS_MASK | O_CLOEXEC)) in SYSCALL_DEFINE1()
249 fd = get_unused_fd_flags(flags & O_CLOEXEC); in SYSCALL_DEFINE1()
/linux/tools/testing/selftests/core/
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/
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/include/uapi/linux/
A Deventfd.h8 #define EFD_CLOEXEC O_CLOEXEC
A Dtimerfd.h32 #define TFD_CLOEXEC O_CLOEXEC
A Ddma-heap.h19 #define DMA_HEAP_VALID_FD_FLAGS (O_CLOEXEC | O_ACCMODE)
A Dsignalfd.h17 #define SFD_CLOEXEC O_CLOEXEC
/linux/arch/mips/include/asm/
A Dsocket.h45 #define SOCK_CLOEXEC O_CLOEXEC
/linux/arch/parisc/include/uapi/asm/
A Dfcntl.h15 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
/linux/arch/alpha/include/uapi/asm/
A Dfcntl.h18 #define O_CLOEXEC 010000000 /* set close_on_exec */ macro
/linux/arch/sparc/include/uapi/asm/
A Dfcntl.h21 #define O_CLOEXEC 0x400000 macro
/linux/tools/testing/selftests/filesystems/
A Ddevpts_pts.c105 master = open(ptmx, O_RDWR | O_NOCTTY | O_CLOEXEC); in do_tiocgptpeer()
123 slave = ioctl(master, TIOCGPTPEER, O_RDWR | O_NOCTTY | O_CLOEXEC); in do_tiocgptpeer()
/linux/tools/testing/selftests/kvm/lib/
A Duserfaultfd_util.c137 uffd = syscall(__NR_userfaultfd, O_CLOEXEC | O_NONBLOCK); in uffd_setup_demand_paging()
158 ret = pipe2((int *) &pipes, O_CLOEXEC | O_NONBLOCK); in uffd_setup_demand_paging()

Completed in 60 milliseconds

1234567