ref: 98a5c516f0d3c3a604958f27b9808ce63fd8df0a
parent: f70190d3c1b0f3e52bf9b53caf9a883da7579fbe
	author: Sigrid Solveig Haflínudóttir <ftrvxmtrx@gmail.com>
	date: Thu Aug  5 08:26:33 EDT 2021
	
ignore closed pipe writes to exit properly
--- a/hj264.c
+++ b/hj264.c
@@ -236,6 +236,8 @@
Hj264 *h;
int sz;
+	threadsetname("hj264/encthread");+
h = p;
prev = nil;
 	for(;;){@@ -336,6 +338,12 @@
return 1;
}
+static int
+pipeignore(void *, char *s)
+{+ return strncmp(s, "sys: write", 10) == 0 ? 1 : 0;
+}
+
int
main(int argc, char **argv)
 {@@ -439,6 +447,7 @@
}
*procdata() = h;
threadnotify(done, 1);
+ atnotify(pipeignore, 1);
procrfork(encthread, h, mainstacksize, RFCENVG);
 	if(h->fmt == FmtIVF){--
⑨