Lines Matching refs:pgrp
35 struct pid *pgrp, *tty_pgrp;
42 pgrp = task_pgrp(current);
45 tty_pgrp = tty->pgrp;
48 if (tty_pgrp && pgrp != tty_pgrp) {
55 kill_pgrp(pgrp, sig, 1);
63 tty_warn(tty, "sig=%d, tty->pgrp == NULL!\n", sig);
101 * The session and fg pgrp references will be non-NULL if
105 put_pid(tty->pgrp);
106 tty->pgrp = get_pid(task_pgrp(current));
216 tty_pgrp = get_pid(tty->pgrp);
217 if (tty->pgrp)
218 p->signal->tty_old_pgrp = get_pid(tty->pgrp);
301 put_pid(tty->pgrp);
303 tty->pgrp = NULL;
309 /* If tty->ctrl.pgrp is not NULL, it may be assigned to
312 * after tty->ctrl.pgrp set to NULL.
401 * tty_get_pgrp - return a ref counted pgrp pid
410 struct pid *pgrp;
413 pgrp = get_pid(tty->pgrp);
416 return pgrp;
421 * This checks not only the pgrp, but falls back on the pid if no
422 * satisfactory pgrp is found. I dunno - gdb doesn't work correctly
427 static struct pid *session_of_pgrp(struct pid *pgrp)
432 p = pid_task(pgrp, PIDTYPE_PGID);
434 p = pid_task(pgrp, PIDTYPE_PID);
481 struct pid *pgrp;
503 pgrp = find_vpid(pgrp_nr);
505 if (!pgrp)
508 if (session_of_pgrp(pgrp) != task_session(current))
511 put_pid(real_tty->pgrp);
512 real_tty->pgrp = get_pid(pgrp);