From e7636cd208e5babb0c9f4861bc4be0c3fb797f64 Mon Sep 17 00:00:00 2001 From: David du Colombier <0intro@gmail.com> Date: Tue, 17 Jul 2001 00:00:00 +0000 Subject: [PATCH] Plan 9 from Bell Labs 2001-07-17 --- port/devproc.c | 3 +++ port/proc.c | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/port/devproc.c b/port/devproc.c index 56ecfd26ca8e051cc8cef00ac686d2e6818a773d..f5bc44332f57753b7d8e9f6dae48ef38c25f6b0d 100644 --- a/port/devproc.c +++ b/port/devproc.c @@ -980,6 +980,9 @@ procctlreq(Proc *p, char *va, int n) int i, npc; char buf[64]; + if(p->kp) /* no ctl requests to kprocs */ + error(Eperm); + kstrcpy(buf, va, sizeof buf); if(strncmp(buf, "stop", 4) == 0) diff --git a/port/proc.c b/port/proc.c index 0fbb01437fe9caf8b3de043689cc63cb3db4a657..fe5793458cc855fb9b3c6162b4e42e6161edc984 100644 --- a/port/proc.c +++ b/port/proc.c @@ -475,7 +475,10 @@ sleep(Rendez *r, int (*f)(void*), void *arg) if(up->notepending) { up->notepending = 0; splx(s); - error(Eintr); + if(up->kp) + print("attempt to interrupt %ld %s\n", up->pid, up->text); + else + error(Eintr); } splx(s);