From 382122a37633d0c5a8923db401772d66b04e2432 Mon Sep 17 00:00:00 2001 From: "Michael I. Bushnell" Date: Thu, 30 Jun 1994 18:42:53 +0000 Subject: Formerly mgt.c.~14~ --- proc/mgt.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/proc/mgt.c b/proc/mgt.c index 250cfae0..b914c761 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -172,9 +172,12 @@ S_proc_child (struct proc *parentp, parentp->p_ochild = childp; /* Process group structure. */ - leave_pgrp (childp); - childp->p_pgrp = parentp->p_pgrp; - join_pgrp (childp); + if (childp->p_pgrp != parentp->p_pgrp) + { + leave_pgrp (childp); + childp->p_pgrp = parentp->p_pgrp; + join_pgrp (childp); + } childp->p_parentset = 1; if (childp->p_msgport) -- cgit v1.2.3