diff options
author | Michael I. Bushnell <mib@gnu.org> | 1994-04-21 23:03:33 +0000 |
---|---|---|
committer | Michael I. Bushnell <mib@gnu.org> | 1994-04-21 23:03:33 +0000 |
commit | 2b72c053eca676ef0484aa2e69891f3f4fdb141a (patch) | |
tree | 2bc3e94ed2b7d0289a783e09faf688f43d8b2439 /proc | |
parent | 60b4c9231e4447295e6772321815e4e5f4dbb3c8 (diff) |
Formerly mgt.c.~6~
Diffstat (limited to 'proc')
-rw-r--r-- | proc/mgt.c | 17 |
1 files changed, 14 insertions, 3 deletions
@@ -160,6 +160,8 @@ S_proc_child (struct proc *parentp, and place us under our new parent. Sanity check to make sure parent is currently init. */ assert (childp->p_parent == startup_proc); + if (childp->p_sib) + childp->p_sib->p_prevsib = childp->p_prevsib; *childp->p_prevsib = childp->p_sib; childp->p_parent = parentp; @@ -563,16 +565,23 @@ process_has_exited (struct proc *p) of our list onto init's. */ if (p->p_ochild) { + int last; struct proc *tp; /* will point to the last one */ /* first tell them their parent is changing */ for (tp = p->p_ochild; tp->p_sib; tp = tp->p_sib) + { + if (tp->p_msgport != MACH_PORT_NULL) + nowait_proc_newids (tp->p_msgport, tp->p_task, 1, + tp->p_pgrp->pg_pgid, !tp->p_pgrp->pg_orphcnt); + tp->p_parent = startup_proc; + } + if (tp->p_msgport != MACH_PORT_NULL) nowait_proc_newids (tp->p_msgport, tp->p_task, 1, tp->p_pgrp->pg_pgid, !tp->p_pgrp->pg_orphcnt); - nowait_proc_newids (tp->p_msgport, tp->p_task, 1, tp->p_pgrp->pg_pgid, - !tp->p_pgrp->pg_orphcnt); + tp->p_parent = startup_proc; - /* And now nappend the list. */ + /* And now nappend the lists. */ tp->p_sib = startup_proc->p_ochild; if (tp->p_sib) tp->p_sib->p_prevsib = &tp->p_sib; @@ -583,6 +592,8 @@ process_has_exited (struct proc *p) reparent_zombies (p); /* Remove us from our parent's list of children. */ + if (p->p_sib) + p->p_sib->p_prevsib = p->p_prevsib; *p->p_prevsib = p->p_sib; leave_pgrp (p); |