ref: 1f827e781f56f04679dcf1bd2a5531c1d599f662
parent: 81ee69b2b87b4041adfb682c3b493ec79ed7ea24
author: cinap_lenrek <cinap_lenrek@felloff.net>
date: Thu Apr 16 11:31:51 EDT 2015
kernel: avoid posting note to kernel process in faulterror() the intend of posting a note to the faulting process is to interrupt the syscall to give the note handler a chance to handle it. kernel processes however, have no note handlers and all the postnote() does is set up->notepending which will make the next attempt to sleep raise an Eintr[] error. this is harmless, but usually not what we want.
--- a/sys/src/9/port/fault.c
+++ b/sys/src/9/port/fault.c
@@ -67,7 +67,8 @@
s = buf;
}
if(up->nerrlab) {- postnote(up, 1, s, NDebug);
+ if(up->kp == 0)
+ postnote(up, 1, s, NDebug);
error(s);
}
pexit(s, 1);
--
⑨