git: 9front

Download patch

ref: ff21390a7b7c509285d17ddb13ddf341f27c087a
parent: b18221b10c83d81a9eb4d5f896ad02e3b69095f5
author: rodri <rgl@antares-labs.eu>
date: Tue Jan 6 09:37:52 EST 2026

stats: handle "tls error" read error message in checkhang()

--- a/sys/src/cmd/stats.c
+++ b/sys/src/cmd/stats.c
@@ -278,12 +278,17 @@
 void
 checkhung(void)
 {
-	static char Ehungup[] = "i/o on hungup channel";
+	static char *Etab[] = {
+		"i/o on hungup channel",
+		"tls error",
+	};
 	char err[ERRMAX];
+	int i;
 
 	rerrstr(err, sizeof(err));
-	if(strncmp(err, Ehungup, sizeof(Ehungup)-1) == 0)
-		exits("restart");	/* let supervisor handle restart */
+	for(i = 0; i < nelem(Etab); i++)
+		if(strncmp(err, Etab[i], strlen(Etab[i])) == 0)
+			exits("restart");	/* let supervisor handle restart */
 }
 
 int
--