shithub: riscv

Download patch

ref: 1238374df998b7f4a3efcf0532076ee1d18bc575
parent: 36dc22fd5713cca65bbe31eb7d7a5a6d6b034637
author: cinap_lenrek <cinap_lenrek@centraldogma>
date: Tue Dec 13 11:10:37 EST 2011

killbig(): fix crash if no process could be found

--- a/sys/src/9/port/proc.c
+++ b/sys/src/9/port/proc.c
@@ -1514,7 +1514,8 @@
 			max = l;
 		}
 	}
-
+	if(kp == 0)
+		return;
 	print("%lud: %s killed: %s\n", kp->pid, kp->text, why);
 	for(p = procalloc.arena; p < ep; p++) {
 		if(p->state == Dead || p->kp)