]> granicus.if.org Git - python/commit
Issue #23834: Add sock_call() helper function
authorVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Apr 2015 19:57:09 +0000 (21:57 +0200)
committerVictor Stinner <victor.stinner@gmail.com>
Wed, 1 Apr 2015 19:57:09 +0000 (21:57 +0200)
commit31bf2d50735f7d0eb1407fe450e878b7f6e7715c
treeebea5c3ccb2c157e89efb10b4793649759945753
parentc7489a5595293153205a20d77a667a0260b6e96d
Issue #23834: Add sock_call() helper function

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.
Modules/socketmodule.c