_PATH_TTY
_PATH_TTY, optarg);
if ((tty = open(_PATH_TTY, O_WRONLY)) >= 0) {
static char def[] = _PATH_TTY;
bcopy(def, s, sizeof(_PATH_TTY));
(input = output = __pledge_open(_PATH_TTY, O_RDWR | O_CLOEXEC)) == -1) {
if ((mytty = fopen(_PATH_TTY, "r")) == NULL)
quit("fopen on %s fails: %s\n", _PATH_TTY, strerror(errno));
info_fd = open(_PATH_TTY, O_WRONLY);
terminal = fopen(_PATH_TTY, "r");
warn("cannot open %s", _PATH_TTY);
char tbuf[PATH_MAX + 2], tname[sizeof(_PATH_TTY) + 10];
(void)snprintf(tname, sizeof(tname), "%s??", _PATH_TTY);
if (unveil(_PATH_TTY, "r") == -1) {
ttyfd = open(_PATH_TTY, O_RDONLY);
if ((fd = open(_PATH_TTY, O_RDONLY | O_NOCTTY)) >= 0) {
ttyfd = open(_PATH_TTY, O_RDWR);
debug_f("can't open %s: %s", _PATH_TTY,
fd = open(_PATH_TTY, O_WRONLY);
if ((fd = open(_PATH_TTY, O_RDWR | O_NOCTTY)) >= 0) {
fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
fd = open(_PATH_TTY, O_RDWR | O_NOCTTY);
const char *ttynam = _PATH_TTY;
} else if ((fd = open(_PATH_TTY, O_RDONLY)) != -1) {
if ((fd = open(_PATH_TTY, O_RDONLY)) < 0) {
warn("%s", _PATH_TTY);
if ((fd = open(_PATH_TTY, O_RDONLY)) == -1) {
if ((ttyfp = fopen(_PATH_TTY, "r")) == NULL)