git: 9front

Download patch

ref: bcf385acea963d657e65a2ac989425091012bdbf
parent: c53fc88756db97a5ee28881f131d2f2bb9bb8689
author: Jacob Moody <moody@posixcafe.org>
date: Sat Sep 10 23:38:55 EDT 2022

rio: more pointy edges with none attach

Would crash when reading from wctl in riostart.

--- a/sys/src/cmd/rio/xfid.c
+++ b/sys/src/cmd/rio/xfid.c
@@ -293,7 +293,7 @@
 			ntsnarf = 0;
 		break;
 	case Qwctl:
-		if(x->mode==OREAD || x->mode==ORDWR){
+		if(w != nil && (x->mode==OREAD || x->mode==ORDWR)){
 			/*
 			 * It would be much nicer to implement fan-out for wctl reads,
 			 * so multiple people can see the resizings, but rio just isn't
@@ -365,7 +365,7 @@
 		}
 		break;
 	case Qwctl:
-		if(x->f->mode==OREAD || x->f->mode==ORDWR)
+		if(w != nil && (x->f->mode==OREAD || x->f->mode==ORDWR))
 			w->wctlopen = FALSE;
 		break;
 	case Qtap:
--