Lines Matching full:child
87 struct child { struct
93 static struct child clone_newns(int (*fn)(void *), void *args, in clone_newns() argument
97 struct child ret; in clone_newns()
121 ksft_print_msg("New child: %d, fd: %d\n", ret.pid, ret.fd); in clone_newns()
126 static inline void child_close(struct child *child) in child_close() argument
128 close(child->fd); in child_close()
131 static inline int child_join(struct child *child, struct error *err) in child_join() argument
135 r = wait_for_pid(child->pid); in child_join()
140 error_set(err, r, "child %d reported: %d", child->pid, r); in child_join()
142 if (munmap(child->stack, CHILD_STACK_SIZE)) { in child_join()
143 error_set(err, -1, "munmap of child stack failed (errno %d)", errno); in child_join()
151 static inline int child_join_close(struct child *child, struct error *err) in child_join_close() argument
153 child_close(child); in child_join_close()
154 return child_join(child, err); in child_join_close()
255 struct child a, b; in test_pidfd_fdinfo_nspid()
259 /* Create a new child in a new pid and mount namespace */ in test_pidfd_fdinfo_nspid()
263 /* Pass the pidfd representing the first child to the in test_pidfd_fdinfo_nspid()
264 * second child, which will be in a sibling pid namespace, in test_pidfd_fdinfo_nspid()
288 struct child a; in test_pidfd_dead_fdinfo()
292 /* Create a new child in a new pid and mount namespace */ in test_pidfd_dead_fdinfo()