Re: Patch for select and APC on win32

From: Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>
To: 'Magnus Hagander' <mha(at)sollentuna(dot)net>, Claudio Natoli <claudio(dot)natoli(at)memetrics(dot)com>, pgsql-patches(at)postgresql(dot)org
Subject: Re: Patch for select and APC on win32
Date: 2004-03-23 22:35:15
Message-ID: A02DEC4D1073D611BAE8525405FCCE2B55F3AE@harris.memetrics.local
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-patches


> >What I am wondering about now, is where else we need to change? AFAICS,
> >there is (at least?) one signal handler that performs sockets
> >ops, namely Async_NotifyHandler.
>
> Actually, I don't think we need to do anything about that one. This
> signal handler is used in the backend (not postmaster), and the backend
> never calls selcet(). The other calls (recv, send etc) return correct
> return values even when a socket call is made in the APC, I'm fairly
> certain.

Not so sure. The reason I brought this up was because I tried the same test
(as I wrote before using select()) with recv(), and it returns -1 when
interrupted by an APC, which is ok, but errno is 0, and WSA/GetLastError
returns 997 (ERROR_IO_PENDING). [EINTR or WSAEINTR would have been nice].
Presumably send() also misbehaves.

Seems like it might actually be something to consider.

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 Christopher Kings-Lynne 2004-03-24 01:36:16 Re: dollar quoting and pg_dump
Previous Message Andrew Dunstan 2004-03-23 22:15:00 Re: dollar quoting and pg_dump