Home
last modified time | relevance | path

Searched refs:pidfd (Results 1 - 25 of 39) sorted by relevance

12

/third_party/ltp/testcases/kernel/syscalls/fanotify/
H A Dfanotify21.c16 * ("fanotify: add pidfd support to the fanotify API").
27 #include "lapi/pidfd.h"
50 "return a valid pidfd for event created by self",
55 "return invalid pidfd for event created by terminated child",
65 static struct pidfd_fdinfo_t *read_pidfd_fdinfo(int pidfd) in read_pidfd_fdinfo() argument
72 SAFE_ASPRINTF(&fdinfo_path, "/proc/self/fdinfo/%d", pidfd); in read_pidfd_fdinfo()
113 int pidfd; in do_setup() local
128 pidfd = SAFE_PIDFD_OPEN(getpid(), 0); in do_setup()
130 self_pidfd_fdinfo = read_pidfd_fdinfo(pidfd); in do_setup()
133 "pidfd in do_setup()
[all...]
/third_party/ltp/testcases/kernel/syscalls/pidfd_getfd/
H A Dpidfd_getfd02.c12 * - EBADF pidfd is not a valid PID file descriptor
14 * to by pidfd
16 * - ESRCH the process referred to by pidfd does not exist (it has terminated
19 * over the process referred to by pidfd
26 #include "lapi/pidfd.h"
28 static int valid_pidfd = -1, invalid_pidfd = -1, pidfd = -1; variable
33 int *pidfd; member
38 {"invalid pidfd", &invalid_pidfd, 0, 0, EBADF},
41 {"the process referred to by pidfd doesn't exist", NULL, 0, 0, ESRCH},
62 if (pidfd > in cleanup()
95 pidfd, tc->targetfd, tc->flags, tc->name); run() local
[all...]
H A Dpidfd_getfd01.c25 #include "lapi/pidfd.h"
30 static int pidfd = -1; variable
57 pidfd = SAFE_PIDFD_OPEN(pid, 0); in run()
59 TST_EXP_FD_SILENT(pidfd_getfd(pidfd, targetfd, 0), in run()
60 "pidfd_getfd(%d, %d , 0)", pidfd, targetfd); in run()
69 tst_res(TPASS, "pidfd_getfd(%d, %d, 0) passed", pidfd, targetfd); in run()
73 SAFE_CLOSE(pidfd); in run()
90 if (pidfd > -1) in cleanup()
91 SAFE_CLOSE(pidfd); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/pidfd_open/
H A Dpidfd_open04.c11 * that waitid() with a non-blocking pidfd returns EAGAIN.
18 #include "lapi/pidfd.h"
24 static int pidfd = -1; variable
40 pidfd = TST_RET; in run()
41 flag = SAFE_FCNTL(pidfd, F_GETFL); in run()
48 TST_EXP_FAIL(waitid(P_PIDFD, pidfd, &info, WEXITED), EAGAIN, in run()
53 ret = TST_RETRY_FUNC(waitid(P_PIDFD, pidfd, &info, WEXITED), TST_RETVAL_EQ0); in run()
61 SAFE_CLOSE(pidfd); in run()
82 if (pidfd > -1) in cleanup()
83 SAFE_CLOSE(pidfd); in cleanup()
[all...]
H A Dpidfd_open01.c17 #include "lapi/pidfd.h"
19 static int pidfd = -1; variable
27 pidfd = TST_RET; in run()
28 flag = SAFE_FCNTL(pidfd, F_GETFD); in run()
30 SAFE_CLOSE(pidfd); in run()
40 if (pidfd > -1) in cleanup()
41 SAFE_CLOSE(pidfd); in cleanup()
/third_party/ltp/testcases/kernel/syscalls/pidfd_send_signal/
H A Dpidfd_send_signal03.c20 * child using the pidfd of the first one.
28 #include "lapi/pidfd.h"
34 static int pidfd, new_pidfd; variable
61 pidfd = SAFE_OPEN(pid_filename, O_DIRECTORY | O_CLOEXEC); in verify_pidfd_send_signal()
62 old_inode = get_inode_number(pidfd); in verify_pidfd_send_signal()
90 SAFE_CLOSE(pidfd); in verify_pidfd_send_signal()
103 TEST(pidfd_send_signal(pidfd, SIGUSR1, NULL, 0)); in verify_pidfd_send_signal()
115 SAFE_CLOSE(pidfd); in verify_pidfd_send_signal()
134 if (pidfd > 0) in cleanup()
135 SAFE_CLOSE(pidfd); in cleanup()
[all...]
H A Dpidfd_send_signal02.c27 #include "lapi/pidfd.h"
34 static int pidfd; variable
45 {&pidfd, &info, CORRECT_SIGNAL, 99999, EINVAL},
47 {&pidfd, &info, DIFFERENT_SIGNAL, 0, EINVAL},
73 pidfd = SAFE_OPEN("/proc/self", O_DIRECTORY | O_CLOEXEC); in setup()
95 if (pidfd > 0) in cleanup()
96 SAFE_CLOSE(pidfd); in cleanup()
H A Dpidfd_send_signal01.c19 #include "lapi/pidfd.h"
28 static int pidfd; variable
59 TEST(pidfd_send_signal(pidfd, SIGNAL, uinfo, 0)); in verify_pidfd_send_signal()
78 pidfd = SAFE_OPEN("/proc/self", O_DIRECTORY | O_CLOEXEC); in setup()
100 if (pidfd > 0) in cleanup()
101 SAFE_CLOSE(pidfd); in cleanup()
/third_party/ltp/include/lapi/
H A Dpidfd.h12 # include <sys/pidfd.h>
28 static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, in pidfd_send_signal() argument
31 return tst_syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags); in pidfd_send_signal()
55 static inline int pidfd_getfd(int pidfd, int targetfd, unsigned int flags) in pidfd_getfd() argument
57 return tst_syscall(__NR_pidfd_getfd, pidfd, targetfd, flags); in pidfd_getfd()
H A Dpidfd_send_signal.h20 static inline int pidfd_send_signal(int pidfd, int sig, siginfo_t *info, in pidfd_send_signal() argument
23 return tst_syscall(__NR_pidfd_send_signal, pidfd, sig, info, flags); in pidfd_send_signal()
H A Dsched.h51 uint64_t __attribute__((aligned(8))) pidfd; member
65 uint64_t __attribute__((aligned(8))) pidfd; member
H A Dclone.h21 uint64_t __attribute__((aligned(8))) pidfd; member
37 #define CLONE_PIDFD 0x00001000 /* set if a pidfd should be placed in parent */
H A Dfanotify.h192 int32_t pidfd; member
/third_party/ltp/testcases/kernel/syscalls/clone3/
H A Dclone302.c29 int **pidfd; member
43 {"invalid pidfd", &valid_args, sizeof(*valid_args), CLONE_PIDFD, &invalid_address, SIGCHLD, 0, 0, 0, EFAULT},
78 if (tc->pidfd) in run()
79 args->pidfd = (uint64_t)(*tc->pidfd); in run()
81 args->pidfd = 0; in run()
H A Dclone301.c19 #include "lapi/pidfd.h"
24 static int pidfd, child_tid, parent_tid, parent_received_signal; variable
117 args->pidfd = (uint64_t)(&pidfd); in run()
141 TEST(pidfd_send_signal(pidfd, CHILD_SIGNAL, &uinfo, 0)); in run()
/third_party/ltp/testcases/kernel/syscalls/process_madvise/
H A Dprocess_madvise01.c87 int pidfd; in run() local
101 pidfd = SAFE_PIDFD_OPEN(pid_alloc, 0); in run()
106 ret = tst_syscall(__NR_process_madvise, pidfd, &vec, 1UL, in run()
/third_party/python/Lib/asyncio/
H A Dunix_events.py944 for pidfd, _, _ in self._callbacks.values():
945 self._loop._remove_reader(pidfd)
946 os.close(pidfd)
955 pidfd = os.pidfd_open(pid)
956 self._loop._add_reader(pidfd, self._do_wait, pid)
957 self._callbacks[pid] = pidfd, callback, args
960 pidfd, callback, args = self._callbacks.pop(pid)
961 self._loop._remove_reader(pidfd)
975 os.close(pidfd)
980 pidfd,
[all...]
/third_party/python/Modules/clinic/
H A Dsignalmodule.c.h599 "pidfd_send_signal($module, pidfd, signalnum, siginfo=None, flags=0, /)\n"
608 signal_pidfd_send_signal_impl(PyObject *module, int pidfd, int signalnum,
615 int pidfd; in signal_pidfd_send_signal() local
623 pidfd = _PyLong_AsInt(args[0]); in signal_pidfd_send_signal()
624 if (pidfd == -1 && PyErr_Occurred()) { in signal_pidfd_send_signal()
643 return_value = signal_pidfd_send_signal_impl(module, pidfd, signalnum, siginfo, flags); in signal_pidfd_send_signal()
/third_party/rust/crates/libc/src/unix/linux_like/linux/musl/b64/x86_64/
H A Dalign.rs14 pub pidfd: ::c_ulonglong,
/third_party/rust/crates/libc/src/unix/linux_like/linux/gnu/b64/x86_64/
H A Dalign.rs13 pub pidfd: ::c_ulonglong,
/third_party/rust/crates/libc/src/unix/linux_like/linux/gnu/b64/loongarch64/
H A Dalign.rs29 pub pidfd: ::c_ulonglong,
/third_party/rust/crates/libc/src/unix/linux_like/linux/musl/b64/loongarch64/
H A Dalign.rs29 pub pidfd: ::c_ulonglong,
/third_party/rust/crates/libc/src/unix/linux_like/linux/musl/b64/aarch64/
H A Dalign.rs31 pub pidfd: ::c_ulonglong,
/third_party/rust/crates/libc/src/unix/linux_like/linux/gnu/b64/aarch64/
H A Dalign.rs40 pub pidfd: ::c_ulonglong,
/third_party/python/Modules/
H A Dsignalmodule.c1352 pidfd: int
1362 signal_pidfd_send_signal_impl(PyObject *module, int pidfd, int signalnum, argument
1371 if (syscall(__NR_pidfd_send_signal, pidfd, signalnum, NULL, flags) < 0) {

Completed in 9 milliseconds

12