diff options
| author | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-05-27 01:09:34 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2013-05-27 01:09:34 +0200 |
| commit | c4153b7755e3a4f3cab57ad8cbe85d18cc7cbd77 (patch) | |
| tree | fd3678c7e64d5f37f531fab8be1d14884abbd78f | |
| parent | 24b908be8a3edb75a63683eb5008aba3c9a1bb52 (diff) | |
| download | plan9front-c4153b7755e3a4f3cab57ad8cbe85d18cc7cbd77.tar.xz | |
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.
| -rw-r--r-- | sys/src/9/port/chan.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/src/9/port/chan.c b/sys/src/9/port/chan.c index d0d0ce4bb..9577eb8d3 100644 --- a/sys/src/9/port/chan.c +++ b/sys/src/9/port/chan.c @@ -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); |
