Lines Matching refs:real_tty
444 * @real_tty: tty side of the tty passed by the user if a pty else the tty
452 static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
457 * (tty == real_tty) is a cheap way of
460 if (tty == real_tty && current->signal->tty != real_tty)
462 pid = tty_get_pgrp(real_tty);
471 * @real_tty: tty side device matching tty passed by user
479 static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
483 int retval = tty_check_change(real_tty);
495 spin_lock_irq(&real_tty->ctrl_lock);
497 (current->signal->tty != real_tty) ||
498 (real_tty->session != task_session(current))) {
511 put_pid(real_tty->pgrp);
512 real_tty->pgrp = get_pid(pgrp);
516 spin_unlock_irq(&real_tty->ctrl_lock);
523 * @real_tty: tty side of the tty passed by the user if a pty else the tty
529 static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p)
535 * (tty == real_tty) is a cheap way of
538 if (tty == real_tty && current->signal->tty != real_tty)
541 spin_lock_irqsave(&real_tty->ctrl_lock, flags);
542 if (!real_tty->session)
544 sid = pid_vnr(real_tty->session);
545 spin_unlock_irqrestore(&real_tty->ctrl_lock, flags);
550 spin_unlock_irqrestore(&real_tty->ctrl_lock, flags);
555 * Called from tty_ioctl(). If tty is a pty then real_tty is the slave side,
556 * if not then tty == real_tty.
558 long tty_jobctrl_ioctl(struct tty_struct *tty, struct tty_struct *real_tty,
570 return tiocsctty(real_tty, file, arg);
572 return tiocgpgrp(tty, real_tty, p);
574 return tiocspgrp(tty, real_tty, p);
576 return tiocgsid(tty, real_tty, p);