summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--sys/src/9/port/devproc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/src/9/port/devproc.c b/sys/src/9/port/devproc.c
index 699283f5b..46b1da846 100644
--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -1158,8 +1158,6 @@ procwrite(Chan *c, void *va, long n, vlong off)
if(c->qid.type & QTDIR)
error(Eisdir);
- p = proctab(SLOT(c->qid));
-
/* Use the remembered noteid in the channel rather
* than the process pgrpid
*/
@@ -1172,6 +1170,8 @@ procwrite(Chan *c, void *va, long n, vlong off)
return n;
}
+ p = proctab(SLOT(c->qid));
+
eqlock(&p->debug);
if(waserror()){
qunlock(&p->debug);