Lines Matching refs:real_tty
446 static int tiocgpgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) in tiocgpgrp() argument
454 if (tty == real_tty && current->signal->tty != real_tty) in tiocgpgrp()
456 pid = tty_get_pgrp(real_tty); in tiocgpgrp()
473 static int tiocspgrp(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) in tiocspgrp() argument
477 int retval = tty_check_change(real_tty); in tiocspgrp()
489 spin_lock_irq(&real_tty->ctrl_lock); in tiocspgrp()
491 (current->signal->tty != real_tty) || in tiocspgrp()
492 (real_tty->session != task_session(current))) { in tiocspgrp()
505 put_pid(real_tty->pgrp); in tiocspgrp()
506 real_tty->pgrp = get_pid(pgrp); in tiocspgrp()
510 spin_unlock_irq(&real_tty->ctrl_lock); in tiocspgrp()
523 static int tiocgsid(struct tty_struct *tty, struct tty_struct *real_tty, pid_t __user *p) in tiocgsid() argument
532 if (tty == real_tty && current->signal->tty != real_tty) in tiocgsid()
535 spin_lock_irqsave(&real_tty->ctrl_lock, flags); in tiocgsid()
536 if (!real_tty->session) in tiocgsid()
538 sid = pid_vnr(real_tty->session); in tiocgsid()
539 spin_unlock_irqrestore(&real_tty->ctrl_lock, flags); in tiocgsid()
544 spin_unlock_irqrestore(&real_tty->ctrl_lock, flags); in tiocgsid()
552 long tty_jobctrl_ioctl(struct tty_struct *tty, struct tty_struct *real_tty, in tty_jobctrl_ioctl() argument
564 return tiocsctty(real_tty, file, arg); in tty_jobctrl_ioctl()
566 return tiocgpgrp(tty, real_tty, p); in tty_jobctrl_ioctl()
568 return tiocspgrp(tty, real_tty, p); in tty_jobctrl_ioctl()
570 return tiocgsid(tty, real_tty, p); in tty_jobctrl_ioctl()