summaryrefslogtreecommitdiffstats
path: root/kernel/exit.c
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/exit.c')
-rw-r--r--kernel/exit.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/kernel/exit.c b/kernel/exit.c
index 8617b9d36..3bd501cf1 100644
--- a/kernel/exit.c
+++ b/kernel/exit.c
@@ -391,7 +391,7 @@ static void exit_notify(void)
p = current->p_cptr;
current->p_cptr = p->p_osptr;
p->p_ysptr = NULL;
- p->flags &= ~(PF_PTRACED|PF_TRACESYS);
+ p->ptrace = 0;
p->p_pptr = p->p_opptr;
p->p_osptr = p->p_pptr->p_cptr;
@@ -432,6 +432,8 @@ NORET_TYPE void do_exit(long code)
printk("Aiee, killing interrupt handler\n");
if (!tsk->pid)
panic("Attempted to kill the idle task!");
+ if (tsk->pid == 1)
+ panic("Attempted to kill init!");
tsk->flags |= PF_EXITING;
del_timer_sync(&tsk->real_timer);
@@ -512,7 +514,7 @@ repeat:
case TASK_STOPPED:
if (!p->exit_code)
continue;
- if (!(options & WUNTRACED) && !(p->flags & PF_PTRACED))
+ if (!(options & WUNTRACED) && !(p->ptrace&PT_PTRACED))
continue;
read_unlock(&tasklist_lock);
retval = ru ? getrusage(p, RUSAGE_BOTH, ru) : 0;