ref: 39cf6b34e34e02aa9bbec28295459769175681ad
parent: 433b18ec2b54387119abdeb0a85767cd92e4a23b
author: cinap_lenrek <[email protected]>
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);