diff options
author | Peter Jeremy <peterjeremy@acm.org> | 2012-02-27 20:46:29 +1100 |
---|---|---|
committer | Alan Coopersmith <alan.coopersmith@oracle.com> | 2012-07-08 11:16:13 -0700 |
commit | c328376384a64f6dbdc476a1d6c5244aad8261ec (patch) | |
tree | 7c594debd3d34b2c52c44b4b5bc562dffd50bb41 | |
parent | b21c6c52bb8109329d7eb63072f8ebf41a42a7f9 (diff) |
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 <alan.coopersmith@oracle.com>
Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r-- | scope.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1134,7 +1134,7 @@ FlushFD ( FD_SET(PeerFD, &BlockedReadDescriptors); } if (FDinfo[fd].buflimit != FDinfo[fd].bufdelivered) { - FD_SET(PeerFD, &WriteDescriptors); + FD_SET(fd, &WriteDescriptors); } } } |