x
This commit is contained in:
parent
47e69250d0
commit
6bfb078b14
|
@ -288,10 +288,10 @@ fork(void)
|
||||||
return pid;
|
return pid;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Pass p's abandoned children to init.
|
||||||
void reparent(struct proc *p) {
|
void reparent(struct proc *p) {
|
||||||
struct proc *pp;
|
struct proc *pp;
|
||||||
|
|
||||||
// Pass p's abandoned children to init.
|
|
||||||
for(pp = ptable.proc; pp < &ptable.proc[NPROC]; pp++){
|
for(pp = ptable.proc; pp < &ptable.proc[NPROC]; pp++){
|
||||||
acquire(&pp->lock);
|
acquire(&pp->lock);
|
||||||
if(pp->parent == p){
|
if(pp->parent == p){
|
||||||
|
|
Loading…
Reference in a new issue