Lines Matching defs:child
86 struct child {
92 static struct child clone_newns(int (*fn)(void *), void *args,
96 struct child ret;
120 ksft_print_msg("New child: %d, fd: %d\n", ret.pid, ret.fd);
125 static inline void child_close(struct child *child)
127 close(child->fd);
130 static inline int child_join(struct child *child, struct error *err)
134 r = wait_for_pid(child->pid);
139 error_set(err, r, "child %d reported: %d", child->pid, r);
141 if (munmap(child->stack, CHILD_STACK_SIZE)) {
142 error_set(err, -1, "munmap of child stack failed (errno %d)", errno);
150 static inline int child_join_close(struct child *child, struct error *err)
152 child_close(child);
153 return child_join(child, err);
254 struct child a, b;
258 /* Create a new child in a new pid and mount namespace */
262 /* Pass the pidfd representing the first child to the
263 * second child, which will be in a sibling pid namespace,
287 struct child a;
291 /* Create a new child in a new pid and mount namespace */