Philip
--- kernel/exit.c.parent Mon Jul 14 18:17:07 1997
+++ kernel/exit.c Mon Jul 14 18:28:30 1997
@@ -532,11 +532,20 @@
while ((p = current->p_cptr) != NULL) {
current->p_cptr = p->p_osptr;
p->p_ysptr = NULL;
- p->flags &= ~(PF_PTRACED|PF_TRACESYS);
- if (task[smp_num_cpus] && task[smp_num_cpus] != current)
/* init */
- p->p_pptr = task[smp_num_cpus];
- else
- p->p_pptr = task[0];
+ if (p->flags & (PF_PTRACED | PF_TRACESYS)) {
+ /* If we are tracing, then the parent pointer
(which is the debugger)
+ * should be switched back to the original
parent (if it still
+ * exists). Happily 'forget_original_parent'
will zap the p_opptr
+ * field if the original parent has died, and
switch it to 'init'
+ */
+ p->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ p->p_pptr = p->p_opptr;
+ } else {
+ if (task[smp_num_cpus] && task[smp_num_cpus] !=
current) /* init */
+ p->p_pptr = task[smp_num_cpus];
+ else
+ p->p_pptr = task[0];
+ }
p->p_osptr = p->p_pptr->p_cptr;
p->p_osptr->p_ysptr = p;
p->p_pptr->p_cptr = p;
-- Philip Gladstone +1 617 487 7700 Raptor Systems, Waltham, MA http://www.raptor.com/