Lines Matching refs:pgrp
36 struct pid *pgrp, *tty_pgrp;
43 pgrp = task_pgrp(current);
46 tty_pgrp = tty->ctrl.pgrp;
49 if (tty_pgrp && pgrp != tty_pgrp) {
56 kill_pgrp(pgrp, sig, 1);
64 tty_warn(tty, "sig=%d, tty->pgrp == NULL!\n", sig);
104 * The session and fg pgrp references will be non-NULL if
108 put_pid(tty->ctrl.pgrp);
109 tty->ctrl.pgrp = get_pid(task_pgrp(current));
222 tty_pgrp = get_pid(tty->ctrl.pgrp);
223 if (tty->ctrl.pgrp)
225 get_pid(tty->ctrl.pgrp);
310 put_pid(tty->ctrl.pgrp);
312 tty->ctrl.pgrp = NULL;
318 /* If tty->ctrl.pgrp is not NULL, it may be assigned to
321 * after tty->ctrl.pgrp set to NULL.
415 * tty_get_pgrp - return a ref counted pgrp pid
424 struct pid *pgrp;
427 pgrp = get_pid(tty->ctrl.pgrp);
430 return pgrp;
435 * This checks not only the pgrp, but falls back on the pid if no
436 * satisfactory pgrp is found. I dunno - gdb doesn't work correctly
441 static struct pid *session_of_pgrp(struct pid *pgrp)
446 p = pid_task(pgrp, PIDTYPE_PGID);
448 p = pid_task(pgrp, PIDTYPE_PID);
495 struct pid *pgrp;
517 pgrp = find_vpid(pgrp_nr);
519 if (!pgrp)
522 if (session_of_pgrp(pgrp) != task_session(current))
525 put_pid(real_tty->ctrl.pgrp);
526 real_tty->ctrl.pgrp = get_pid(pgrp);