[pgpool-committers: 1971] pgpool: Fix unportable code related to SO_REUSEPORT.

Tatsuo Ishii ishii at postgresql.org
Sat May 10 10:04:12 JST 2014


Fix unportable code related to SO_REUSEPORT.

There are several places using setsockopt(sock, SOL_SOCKET,
SO_REUSEPORT...). SO_REUSEPORT is not available on all Linux kernels
and the source code uses ifdef to detect the feature in the compile
time. Problem is, the binary created with kernel which provides the
feature cannot run on a kernel which does not provide the feature. Fix
is, detecting the feature in the run time by checking error code
returned by setsockopt() and ignore it if the cause of the error is
lacking the feature.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=pgpool2.git;a=commitdiff;h=067765e9e9fffcad21ebc0ef0e24e05f6f161b33

Modified Files
--------------
src/watchdog/wd_heartbeat.c |   65 ++++++++++++++++++++++++++++---------------
1 file changed, 43 insertions(+), 22 deletions(-)



More information about the pgpool-committers mailing list