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:
cinap_lenrek 2013-05-27 01:09:34 +02:00
parent 24b908be8a
commit c4153b7755

View file

@ -536,7 +536,10 @@ closechanq(Chan *c)
if(up != 0 && palloc.Lock.p != up && canqlock(&clunkq.q)){
c = up->dot;
up->dot = nil;
kproc("closeproc", closeproc, nil);
if(!waserror()){
kproc("closeproc", closeproc, nil);
poperror();
}
up->dot = c;
}else
wakeup(&clunkq.r);