kernel: closechanq error
catch potential interrupt error from kproc(). this can happen when we run out of processes, then newproc() will call rsrcwait() which does tsleep(). if the process gets a note, this might raise a interrupt error.
This commit is contained in:
parent
24b908be8a
commit
c4153b7755
1 changed files with 4 additions and 1 deletions
|
@ -536,7 +536,10 @@ closechanq(Chan *c)
|
||||||
if(up != 0 && palloc.Lock.p != up && canqlock(&clunkq.q)){
|
if(up != 0 && palloc.Lock.p != up && canqlock(&clunkq.q)){
|
||||||
c = up->dot;
|
c = up->dot;
|
||||||
up->dot = nil;
|
up->dot = nil;
|
||||||
kproc("closeproc", closeproc, nil);
|
if(!waserror()){
|
||||||
|
kproc("closeproc", closeproc, nil);
|
||||||
|
poperror();
|
||||||
|
}
|
||||||
up->dot = c;
|
up->dot = c;
|
||||||
}else
|
}else
|
||||||
wakeup(&clunkq.r);
|
wakeup(&clunkq.r);
|
||||||
|
|
Loading…
Reference in a new issue