Fix /dev/tty-related issues in tmux(1) by hardcoding the PTY major
in VFS in addition to the TTY major. Even though this is exactly
what we did NOT want to have to do, the actual fix for this issue
is going to take a little longer.
Change-Id: I24c75eaf688b9ebd28e931f2e445b8442cfdac78
/* Handle TIOCSCTTY ioctl: set controlling tty.
* TODO: cleaner implementation work in progress.
*/
- if (op == CDEV_IOCTL && bytes == TIOCSCTTY && major(dev) == TTY_MAJOR) {
- fp->fp_tty = dev;
+ if (op == CDEV_IOCTL && bytes == TIOCSCTTY &&
+ (major(dev) == TTY_MAJOR || major(dev) == PTY_MAJOR)) {
+ fp->fp_tty = dev;
}
/* Create a grant for the buffer provided by the user process. */