Lines Matching refs:slavefd
365 int slavefd = -1;
398 if ((slavefd = open(zoneslavename, O_RDWR)) < 0) {
408 if (ioctl(slavefd, I_PUSH, "ptem") == -1) {
419 if (ioctl(slavefd, I_ANCHOR) == -1) {
425 if (ioctl(slavefd, I_PUSH, "ldterm") == -1) {
430 if (ioctl(slavefd, I_PUSH, "ttcompat") == -1) {
439 if (tcsetattr(slavefd, TCSAFLUSH, &save_termios) == -1) {
444 (void) ioctl(slavefd, TIOCSWINSZ, (char *)&winsize);
451 return (slavefd);
454 (void) close(slavefd);
1340 close_func(void *slavefd, int fd)
1342 if (fd != *(int *)slavefd)
2175 int slavefd, newslave;
2182 if ((slavefd = init_slave_pty(zoneid, devroot)) == -1)
2188 (void) fdwalk(close_func, &slavefd);
2191 * Temporarily dup slavefd to stderr; that way if we have
2195 if (slavefd != STDERR_FILENO)
2196 (void) dup2(slavefd, STDERR_FILENO);
2204 if (slavefd != STDERR_FILENO)
2223 (void) close(slavefd);
2226 (void) close(slavefd);
2227 slavefd = newslave;
2234 (void) dup2(slavefd, STDIN_FILENO);
2235 (void) dup2(slavefd, STDOUT_FILENO);
2236 (void) dup2(slavefd, STDERR_FILENO);
2237 if (slavefd != STDIN_FILENO && slavefd != STDOUT_FILENO &&
2238 slavefd != STDERR_FILENO) {
2239 (void) close(slavefd);