git: libfetch: Use select(2) as a consequence of switching to non-blocking

John Marino marino at crater.dragonflybsd.org
Fri Nov 2 12:08:59 PDT 2012


commit f3e2e424df47953bf38d1ac9bb133d7a037b3112
Author: John Marino <draco at marino.st>
Date:   Fri Nov 2 19:46:13 2012 +0100

    libfetch: Use select(2) as a consequence of switching to non-blocking
    
    Since the socket is non-blocking, it is necessary to use select(2) even
    when there is no timeout, because read(2) will return immediately if there
    is no data waiting in the TCP buffer, causing fetch_read() to busy-loop on
    slow connections.
    
    Taken-from: FreeBSD SVN 234837 (30 APR 2012)

Summary of changes:
 lib/libfetch/common.c |   44 +++++++++++++++++++-------------------------
 1 files changed, 19 insertions(+), 25 deletions(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/f3e2e424df47953bf38d1ac9bb133d7a037b3112


-- 
DragonFly BSD source repository



More information about the Commits mailing list