Skip site navigation (1) Skip section navigation (2)

pgsql: Set errno to zero before invoking SSL_read or SSL_write.

From: tgl(at)postgresql(dot)org (Tom Lane)
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Set errno to zero before invoking SSL_read or SSL_write.
Date: 2009-12-30 03:46:08
Message-ID: 20091230034608.F18AE753FBC@cvs.postgresql.org (view raw or flat)
Thread:
Lists: pgsql-committers
Log Message:
-----------
Set errno to zero before invoking SSL_read or SSL_write.  It appears that
at least in some Windows versions, these functions are capable of returning
a failure indication without setting errno.  That puts us into an infinite
loop if the previous value happened to be EINTR.  Per report from Brendan
Hill.

Back-patch to 8.2.  We could take it further back, but since this is only
known to be an issue on Windows and we don't support Windows before 8.2,
it does not seem worth the trouble.

Tags:
----
REL8_2_STABLE

Modified Files:
--------------
    pgsql/src/backend/libpq:
        be-secure.c (r1.74.2.4 -> r1.74.2.5)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/backend/libpq/be-secure.c?r1=1.74.2.4&r2=1.74.2.5)
    pgsql/src/interfaces/libpq:
        fe-secure.c (r1.89.2.2 -> r1.89.2.3)
        (http://anoncvs.postgresql.org/cvsweb.cgi/pgsql/src/interfaces/libpq/fe-secure.c?r1=1.89.2.2&r2=1.89.2.3)

pgsql-committers by date

Next:From: User H-saitoDate: 2009-12-30 04:09:15
Subject: pg-migrator - pg_migrator: follow english.
Previous:From: Tom LaneDate: 2009-12-30 03:46:01
Subject: pgsql: Set errno to zero before invoking SSL_read or SSL_write.

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group