• Victor Stinner's avatar
    Issue #23834: Add sock_call() helper function · 31bf2d50
    Victor Stinner authored
    The BEGIN_SELECT_LOOP and END_SELECT_LOOP macros of socketmodule.c don't handle
    EINTR. Functions using these macros use an inner loop to handle EINTR, but they
    don't recompute the timeout.
    
    This changes replaces the two macros with a new sock_call() function which
    takes a function as a parameter. sock_call() recomputes the timeout, handle
    false positive and handle EINTR.
    31bf2d50
socketmodule.c 203 KB