Lines Matching defs:fd_map
289 int fd_map[3] = { 0, 1, 2 };
293 fd_map[0] = dup(attr->stdinFd->secret->md.osfd);
294 flags = fcntl(fd_map[0], F_GETFL, 0);
296 fcntl(fd_map[0], F_SETFL, flags & ~O_NONBLOCK);
299 fd_map[1] = dup(attr->stdoutFd->secret->md.osfd);
300 flags = fcntl(fd_map[1], F_GETFL, 0);
302 fcntl(fd_map[1], F_SETFL, flags & ~O_NONBLOCK);
305 fd_map[2] = dup(attr->stderrFd->secret->md.osfd);
306 flags = fcntl(fd_map[2], F_GETFL, 0);
308 fcntl(fd_map[2], F_SETFL, flags & ~O_NONBLOCK);
314 process->md.pid = spawn(path, 3, fd_map, NULL, argv, childEnvp);
316 if (fd_map[0] != 0)
317 close(fd_map[0]);
318 if (fd_map[1] != 1)
319 close(fd_map[1]);
320 if (fd_map[2] != 2)
321 close(fd_map[2]);