Re: xbrlapi looping
Hello,
Mario Lang, on Fri 13 Nov 2015 10:35:43 +0100, wrote:
> I remember this bug already showed up, and was supposedly fixed.
> On my newly installed stretch box, I occasionally have
> an xbrlapi process that consumes 100%. Just now, I even found two of
> them, both consuming a full CPU core each.
The attached patch was applied after the 5.2 release. Do you think we
should backport it to Jessie?
Samuel
commit 18c9b3f2f8814f62172d7cee6db8b1d63f8d5085
Author: Dave Mielke <dave@mielke.cc>
Date: Fri Aug 28 19:54:42 2015 -0400
xbrlapi wasn't detecting end-of-file on the BrlAPI socket. (st)
diff --git a/Programs/xbrlapi.c b/Programs/xbrlapi.c
index 07d6ee0..322b093 100644
--- a/Programs/xbrlapi.c
+++ b/Programs/xbrlapi.c
@@ -671,7 +671,7 @@ static void toX_f(const char *display) {
}
#ifdef CAN_SIMULATE_KEY_PRESSES
if (haveXTest && FD_ISSET(brlapi_fd,&readfds)) {
- while ((res = brlapi_readKey(0, &code)==1)) {
+ while (((res = brlapi_readKey(0, &code))==1)) {
switch (code & BRLAPI_KEY_TYPE_MASK) {
case BRLAPI_KEY_TYPE_CMD:
switch (code & BRLAPI_KEY_CODE_MASK) {
Reply to: