summaryrefslogtreecommitdiff
path: root/sys/src/libdraw/mouse.c
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2013-04-27 04:21:08 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2013-04-27 04:21:08 +0200
commit90036b9991198e709330c884b7497fff29e7a58d (patch)
tree548ccf4947618a5c27933a590bb0ddde0516608b /sys/src/libdraw/mouse.c
parenta72a7c1cc2ba721fe0871cd69951ae8ac526487e (diff)
libdraw: avoid printing error on closemouse()
Diffstat (limited to 'sys/src/libdraw/mouse.c')
-rw-r--r--sys/src/libdraw/mouse.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/sys/src/libdraw/mouse.c b/sys/src/libdraw/mouse.c
index 49c5f278e..ceb93819d 100644
--- a/sys/src/libdraw/mouse.c
+++ b/sys/src/libdraw/mouse.c
@@ -52,6 +52,8 @@ _ioproc(void *arg)
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");