Re: APC/socket fix (final?)

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: 'Tom Lane' <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
Cc: 'Magnus Hagander' <mha(at)sollentuna(dot)net>, pgsql-patches(at)postgresql(dot)org
Subject: Re: APC/socket fix (final?)
Date: 2004-03-26 22:47:14
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F3C8@harris.memetrics.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


Tom Lane wrote:
> Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com> writes:
> > ... However, it just occured to me that
> > we could wrap select() by augmenting the read_mask with an
> addition socket,
> > that we know will never be touched, and checking this
> socket on a "valid"
> > return. If this socket is still set, we know we got bitten
> by the APC/socket
> > interaction bug, and can set errno accordingly.
>
> What happens if the socket() call fails?

Then we return in error. Refer to attachment.

> Even if it succeeds, I don't know what the semantics are of selecting on
an un-bound socket ... it
> might perhaps show as error state, for instance.

select doesn't need a socket to be bound to select on it, afaik. In any
case, it isn't necessary under win32, which is what we are discussing.

Cheers,
Claudio

---
Certain disclaimers and policies apply to all email sent from Memetrics.
For the full text of these disclaimers and policies see
<a
href="http://www.memetrics.com/emailpolicy.html">http://www.memetrics.com/em
ailpolicy.html</a>

Browse pgsql-patches by date

  From Date Subject
Next Message Claudio Natoli 2004-03-26 22:53:07 Re: APC/socket fix (final?)
Previous Message Tom Lane 2004-03-26 22:40:28 Re: APC/socket fix (final?)