11 #include <sys/socket.h>
25 static int helper_child(
void *
arg)
67 sp = stack + UM_KERN_PAGE_SIZE -
sizeof(
void *);
74 pid = clone(helper_child, (
void *) sp,
CLONE_VM, &data);
89 n =
read(fds[0], &ret,
sizeof(ret));
114 unsigned long *stack_out)
123 sp = stack + UM_KERN_PAGE_SIZE -
sizeof(
void *);
124 pid = clone(proc, (
void *) sp, flags, arg);
128 "errno = %d\n",
errno);
131 if (stack_out ==
NULL) {
136 "errno = %d\n",
errno);
139 if (!WIFEXITED(status) || (WEXITSTATUS(status) != 0))
141 "returned status 0x%x\n", status);
156 "errno = %d\n", pid,
errno);
158 }
else if (!WIFEXITED(status) || WEXITSTATUS(status) != 0) {
160 "status 0x%x\n", pid, status);