shithub: riscv

Download patch

ref: c45458b929e0f8e5eb26fd97c844977c893f6262
parent: 24d1fbde273f30422d852811d3724ede789acd0d
author: cinap_lenrek <[email protected]>
date: Wed Sep 18 22:24:23 EDT 2019

devproc: move proctab() call after Qnotepg special case in procwrite()

--- a/sys/src/9/port/devproc.c
+++ b/sys/src/9/port/devproc.c
@@ -1158,8 +1158,6 @@
 	if(c->qid.type & QTDIR)
 		error(Eisdir);
 
-	p = proctab(SLOT(c->qid));
-
 	/* Use the remembered noteid in the channel rather
 	 * than the process pgrpid
 	 */
@@ -1171,6 +1169,8 @@
 		pgrpnote(NOTEID(c->pgrpid), buf, NUser);
 		return n;
 	}
+
+	p = proctab(SLOT(c->qid));
 
 	eqlock(&p->debug);
 	if(waserror()){