Lines Matching refs:tty_name
39 char *tty_name;
111 if (*++toys.optargs) TT.tty_name = xmprintf("%s", *toys.optargs);
113 TT.tty_name = xmprintf("%s", *toys.optargs);
122 if (strcmp(TT.tty_name, "-")) {
123 if (*(TT.tty_name) != '/') TT.tty_name = xmprintf("/dev/%s", TT.tty_name);
131 xopen_stdio(TT.tty_name, O_RDWR|O_NDELAY|O_CLOEXEC);
136 if (!isatty(0)) perror_exit("/dev/%s: not a tty", TT.tty_name);
137 chown(TT.tty_name, 0, 0); // change ownership, Hope login will change this
138 chmod(TT.tty_name, 0620);
236 if (*ch == 'l') fputs(TT.tty_name, stdout);