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