From c328376384a64f6dbdc476a1d6c5244aad8261ec Mon Sep 17 00:00:00 2001 From: Peter Jeremy Date: Mon, 27 Feb 2012 20:46:29 +1100 Subject: Bug 46691 - xscope-1.3.1 deadlocks if client or server would block https://bugs.freedesktop.org/show_bug.cgi?id=46691 Use correct write FD to select() on. FlushFD() contains logic to handle the Xclient or Xserver blocking on a write() by changing the global read and write fd_set's so that MainLoop() will select() on the blocking write FD instead of the peer read FD. Unfortunately, the code contains a logic error so that it winds up select()ing for write on the peer FD instead of the blocked FD. Reviewed-by: Alan Coopersmith Signed-off-by: Alan Coopersmith --- scope.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scope.c') diff --git a/scope.c b/scope.c index 9b0ddf9..e665255 100644 --- a/scope.c +++ b/scope.c @@ -1134,7 +1134,7 @@ FlushFD ( FD_SET(PeerFD, &BlockedReadDescriptors); } if (FDinfo[fd].buflimit != FDinfo[fd].bufdelivered) { - FD_SET(PeerFD, &WriteDescriptors); + FD_SET(fd, &WriteDescriptors); } } } -- cgit v1.2.1