diff options
| author | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-16 15:31:51 +0200 |
|---|---|---|
| committer | cinap_lenrek <cinap_lenrek@felloff.net> | 2015-04-16 15:31:51 +0200 |
| commit | 39cf6b34e34e02aa9bbec28295459769175681ad (patch) | |
| tree | ac29072d48cbeca61a3848ee642ecf72a423f12c | |
| parent | 433b18ec2b54387119abdeb0a85767cd92e4a23b (diff) | |
| download | plan9front-39cf6b34e34e02aa9bbec28295459769175681ad.tar.xz | |
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.
| -rw-r--r-- | sys/src/9/port/fault.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/src/9/port/fault.c b/sys/src/9/port/fault.c index 123ae4e80..6565c670a 100644 --- a/sys/src/9/port/fault.c +++ b/sys/src/9/port/fault.c @@ -67,7 +67,8 @@ faulterror(char *s, Chan *c) s = buf; } if(up->nerrlab) { - postnote(up, 1, s, NDebug); + if(up->kp == 0) + postnote(up, 1, s, NDebug); error(s); } pexit(s, 1); |
