Lines Matching refs:real_tty
458 * @real_tty: tty side of the tty passed by the user if a pty else the tty
466 static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
471 * (tty == real_tty) is a cheap way of
474 if (tty == real_tty && current->signal->tty != real_tty)
476 pid = tty_get_pgrp(real_tty);
485 * @real_tty: tty side device matching tty passed by user
493 static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
497 int retval = tty_check_change(real_tty);
509 spin_lock_irq(&real_tty->ctrl.lock);
511 (current->signal->tty != real_tty) ||
512 (real_tty->ctrl.session != task_session(current))) {
525 put_pid(real_tty->ctrl.pgrp);
526 real_tty->ctrl.pgrp = get_pid(pgrp);
530 spin_unlock_irq(&real_tty->ctrl.lock);
537 * @real_tty: tty side of the tty passed by the user if a pty else the tty
543 static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
549 * (tty == real_tty) is a cheap way of
552 if (tty == real_tty && current->signal->tty != real_tty)
555 spin_lock_irqsave(&real_tty->ctrl.lock, flags);
556 if (!real_tty->ctrl.session)
558 sid = pid_vnr(real_tty->ctrl.session);
559 spin_unlock_irqrestore(&real_tty->ctrl.lock, flags);
564 spin_unlock_irqrestore(&real_tty->ctrl.lock, flags);
569 * Called from tty_ioctl(). If tty is a pty then real_tty is the slave side,
570 * if not then tty == real_tty.
572 long tty_jobctrl_ioctl(struct tty_struct *tty, struct tty_struct *real_tty,
584 return tiocsctty(real_tty, file, arg);
586 return tiocgpgrp(tty, real_tty, p);
588 return tiocspgrp(tty, real_tty, p);
590 return tiocgsid(tty, real_tty, p);