summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichael I. Bushnell <mib@gnu.org>1994-07-11 18:32:59 +0000
committerMichael I. Bushnell <mib@gnu.org>1994-07-11 18:32:59 +0000
commitb0f111c28d822223c73ced5a23b07bd93844e0f5 (patch)
tree50a3a53a790622161829aa8acc036825879fca1c
parent23458bb1731951238d6da954539d09a9b95b77cb (diff)
Formerly pgrp.c.~7~
-rw-r--r--proc/pgrp.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/proc/pgrp.c b/proc/pgrp.c
index c8cea52a..f596327a 100644
--- a/proc/pgrp.c
+++ b/proc/pgrp.c
@@ -86,6 +86,8 @@ static inline void
free_pgrp (struct pgrp *pg)
{
*pg->pg_prevp = pg->pg_next;
+ if (pg->pg_next)
+ pg->pg_next->pg_prevp = pg->pg_prevp;
if (!pg->pg_session->s_pgrps)
free_session (pg->pg_session);
remove_pgrp_from_hash (pg);
@@ -339,6 +341,8 @@ leave_pgrp (struct proc *p)
struct pgrp *pg = p->p_pgrp;
*p->p_gprevp = p->p_gnext;
+ if (p->p_gnext)
+ p->p_gnext->p_gprevp = p->p_gprevp;
/* If we were the last member of our pgrp, free it */
if (!pg->pg_plist)