Skip to content

Commit 1993b85

Browse files
committed
xf86-input-mfndev: interrupt attempts to contact gui-agent on SIGTERM
If Xorg is going to be terminated, do not try to connect to gui-agent anymore. This avoids infinite loop when handling SIGTERM, and properly shutdown instead. (cherry picked from commit 0ad1350)
1 parent b201b73 commit 1993b85

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

xf86-input-mfndev/src/qubes.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,12 @@ static int QubesControl(DeviceIntPtr device, int what)
506506
"%s: cannot open device; sleeping...\n",
507507
pInfo->name);
508508
sleep(1);
509+
if (xf86ServerIsExiting()) {
510+
xf86Msg(X_ERROR,
511+
"%s: cannot open device, server exiting, aborting\n",
512+
pInfo->name);
513+
return BadAlloc;
514+
}
509515
}
510516
} while (pInfo->fd < 0);
511517

0 commit comments

Comments
 (0)