|
@@ -119,7 +119,9 @@ void sys__exit(int exitcode)
|
|
|
int x = listpop(p->kids);
|
|
|
while (x)
|
|
|
{
|
|
|
+ lock_acquire(proclock);
|
|
|
processes->pids[x]->parent = NULL;
|
|
|
+ lock_release(proclock);
|
|
|
x = listpop(p->kids);
|
|
|
}
|
|
|
|
|
@@ -137,10 +139,11 @@ void sys__exit(int exitcode)
|
|
|
proc_destroy(p);
|
|
|
}
|
|
|
|
|
|
+ kprintf("curproc is: %p", curproc);
|
|
|
/* if this is the last user process in the system, proc_destroy()
|
|
|
will wake up the kernel menu thread */
|
|
|
//proc_destroy(p);
|
|
|
- if (!(curproc)) thread_exit();
|
|
|
+ thread_exit();
|
|
|
/* thread_exit() does not return, so we should never get here */
|
|
|
panic("return from thread_exit in sys_exit\n");
|
|
|
}
|