Lines Matching refs:pfd
600 int pfd = open("/dev/ptmx", O_RDWR | O_CLOEXEC | O_NOCTTY | O_NONBLOCK);
601 APPSPAWN_CHECK(pfd >= 0, return -1, "Failed open pty err=%{public}d", errno);
602 APPSPAWN_CHECK(grantpt(pfd) >= 0, close(pfd); return -1, "Failed to call grantpt");
603 APPSPAWN_CHECK(unlockpt(pfd) >= 0, close(pfd); return -1, "Failed to call unlockpt");
605 int ret = ptsname_r(pfd, ptsbuffer, sizeof(ptsbuffer));
606 APPSPAWN_CHECK(ret >= 0, close(pfd);
609 APPSPAWN_CHECK(chmod(ptsbuffer, S_IRWXU | S_IRGRP | S_IWGRP | S_IROTH | S_IWOTH) == 0, close(pfd);
611 ptyFd_ = pfd;