ref: 4d7dbb87837f83b6a20493839913f7cf3bb1c268
parent: bab63ca627ae021d859bbe2f37972d25f7c387da
author: cinap_lenrek <cinap_lenrek@gmx.de>
date: Sat Apr 27 00:21:08 EDT 2013
libdraw: avoid printing error on closemouse()
--- a/sys/src/libdraw/mouse.c
+++ b/sys/src/libdraw/mouse.c
@@ -52,6 +52,8 @@
n = read(mc->mfd, buf, sizeof buf);
if(n != 1+4*12){yield(); /* if error is due to exiting, we'll exit here */
+ if(mc->mfd < 0)
+ break;
fprint(2, "mouse: bad count %d not 49: %r\n", n);
if(n<0 || ++nerr>10)
threadexits("read error");--
⑨