Lines Matching refs:pid
1152 static int map_ids(pid_t pid, unsigned long nsid, unsigned long hostid, in map_ids() argument
1157 snprintf(procfile, sizeof(procfile), "/proc/%d/uid_map", pid); in map_ids()
1163 snprintf(procfile, sizeof(procfile), "/proc/%d/gid_map", pid); in map_ids()
1192 static int wait_for_pid(pid_t pid) in wait_for_pid() argument
1197 ret = waitpid(pid, &status, 0); in wait_for_pid()
1214 pid_t pid; in get_userns_fd() local
1217 pid = do_clone(get_userns_fd_cb, NULL, CLONE_NEWUSER); in get_userns_fd()
1218 if (pid < 0) in get_userns_fd()
1221 ret = map_ids(pid, nsid, hostid, range); in get_userns_fd()
1225 snprintf(path, sizeof(path), "/proc/%d/ns/user", pid); in get_userns_fd()
1227 kill(pid, SIGKILL); in get_userns_fd()
1228 wait_for_pid(pid); in get_userns_fd()