diff options
Diffstat (limited to 'src/kernel/proc.c')
-rw-r--r-- | src/kernel/proc.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/kernel/proc.c b/src/kernel/proc.c index 0ce0f50..dc17af2 100644 --- a/src/kernel/proc.c +++ b/src/kernel/proc.c @@ -382,7 +382,14 @@ void proc_tryintr(Proc *p) { } } -void proc_intr(Proc *p) { +void proc_intr(Proc *p, const char *buf, size_t len) { + assert(buf != NULL || len == 0); + + if (4 <= len && memcmp(buf, "kill", 4) == 0) { + proc_kill(p, EINTR); + return; + } + if (!p->intr_fn) return; proc_tryintr(p); |