Lines Matching refs:newpg
2207 pgrp_replace(struct proc * p, struct pgrp * newpg)
2250 p->p_pgrp = newpg;
2251 p->p_pgrpid = newpg->pg_id;
2259 if ((newpg->pg_listflags & (PGRP_FLAG_TERMINATE | PGRP_FLAG_DEAD)) == PGRP_FLAG_TERMINATE) {
2260 newpg->pg_listflags &= ~PGRP_FLAG_TERMINATE;
2263 if ((newpg->pg_listflags & PGRP_FLAG_DEAD) == PGRP_FLAG_DEAD)
2267 pgrp_lock(newpg);
2268 newpg->pg_membercnt++;
2269 LIST_INSERT_HEAD(&newpg->pg_members, p, p_pglist);
2270 pgrp_unlock(newpg);
2273 if (((newpg->pg_listflags & (PGRP_FLAG_TERMINATE | PGRP_FLAG_DEAD)) == PGRP_FLAG_TERMINATE) && (newpg->pg_membercnt != 0)) {
2274 newpg->pg_listflags &= ~PGRP_FLAG_TERMINATE;