1. 07 Nov, 2013 12 commits
  2. 30 May, 2013 1 commit
  3. 23 May, 2013 1 commit
  4. 15 May, 2013 1 commit
  5. 16 Jan, 2013 1 commit
  6. 10 Nov, 2012 2 commits
  7. 05 Oct, 2012 2 commits
  8. 30 Sep, 2012 1 commit
  9. 25 Sep, 2012 1 commit
  10. 18 Sep, 2012 1 commit
  11. 30 Aug, 2012 1 commit
  12. 25 Aug, 2012 3 commits
  13. 14 Aug, 2012 1 commit
  14. 22 Apr, 2012 1 commit
  15. 27 Mar, 2012 3 commits
  16. 26 Mar, 2012 2 commits
  17. 09 Mar, 2012 1 commit
  18. 08 Mar, 2012 2 commits
    • Uli Schlachter's avatar
      Fix a busy loop on BSD and Mac OS · 236f914e
      Uli Schlachter authored
      On FreeBSD MSG_WAITALL on a non-blocking socket fails immediately if less bytes
      than were asked for are available. This is different than the behavior on linux
      where as many bytes as are available are returned in this case. Other OS
      apparently follow the FreeBSD behavior.
      
      _xcb_in_read() is used to fill xcb's read buffer, thus this function will call
      recv() with a big length argument (xcb's read buffer is by default 16 KiB
      large). That many bytes are highly unlikely to be available in the kernel
      buffer.
      
      This means that _xcb_in_read() always failed on FreeBSD. Since the socket was
      still signaled as readable by poll(), this bug even resulted in a busy loop.
      
      The same issue is present in read_block(), but here it is slightly different.
      read_block() is called when we read the first few bytes of an event or a reply,
      so that we already know its length. This means that we should be able to use
      MSG_WAITALL here, because we know how many bytes there have to be.
      
      However, that function could busy loop, too, when only the first few bytes of
      the packet were sent while the rest is stuck somewhere on the way to us. Thus,
      MSG_WAITALL should be removed here, too.
      
      Thanks to Christoph Egger from Debian for noticing the problem, doing all the
      necessary debugging and figuring out what the problem was! This patch is 99%
      from debian. Thanks for all the work.
      
      This bug was introduced in commit 2dcf8b02.
      
      This commit also reverts commit 9061ee45.
      
      Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=45776Signed-off-by: Uli Schlachter's avatarUli Schlachter <psychon@znc.in>
      Reviewed-by: Josh Triplett's avatarJosh Triplett <josh@joshtriplett.org>
      236f914e
    • Jeremy Huddleston Sequoia's avatar
      darwin: Use read(2) rather than recv(2) · 9061ee45
      Jeremy Huddleston Sequoia authored
      2dcf8b02 was causing some regressions on
      darwin, so go back to using read(2) there until I have time to investigate
      further.
      Signed-off-by: Jeremy Huddleston Sequoia's avatarJeremy Huddleston <jeremyhu@apple.com>
      9061ee45
  19. 19 Feb, 2012 1 commit
  20. 10 Feb, 2012 1 commit
  21. 09 Feb, 2012 1 commit