Lines Matching refs:pgrp
81 int session_of_pgrp(int pgrp) in session_of_pgrp() argument
91 if (p->pgrp == pgrp) { in session_of_pgrp()
95 if (p->pid == pgrp) in session_of_pgrp()
110 static int will_become_orphaned_pgrp(int pgrp, struct task_struct * ignored_task) in will_become_orphaned_pgrp() argument
116 if ((p == ignored_task) || (p->pgrp != pgrp) || in will_become_orphaned_pgrp()
120 if ((p->p_pptr->pgrp != pgrp) && in will_become_orphaned_pgrp()
130 int is_orphaned_pgrp(int pgrp) in is_orphaned_pgrp() argument
132 return will_become_orphaned_pgrp(pgrp, 0); in is_orphaned_pgrp()
135 static inline int has_stopped_jobs(int pgrp) in has_stopped_jobs() argument
142 if (p->pgrp != pgrp) in has_stopped_jobs()
348 if ((t->pgrp != current->pgrp) && in exit_notify()
350 will_become_orphaned_pgrp(current->pgrp, current) && in exit_notify()
351 has_stopped_jobs(current->pgrp)) { in exit_notify()
352 kill_pg(current->pgrp,SIGHUP,1); in exit_notify()
353 kill_pg(current->pgrp,SIGCONT,1); in exit_notify()
409 if ((p->pgrp != current->pgrp) && in exit_notify()
411 int pgrp = p->pgrp; in exit_notify() local
414 if (is_orphaned_pgrp(pgrp) && has_stopped_jobs(pgrp)) { in exit_notify()
415 kill_pg(pgrp,SIGHUP,1); in exit_notify()
416 kill_pg(pgrp,SIGCONT,1); in exit_notify()
513 if (p->pgrp != current->pgrp) in sys_wait4()
516 if (p->pgrp != -pid) in sys_wait4()