Re: Patch for select and APC on win32 - Mailing list pgsql-patches

From Claudio Natoli
Subject Re: Patch for select and APC on win32
Date
Msg-id A02DEC4D1073D611BAE8525405FCCE2B55F3AE@harris.memetrics.local
Whole thread Raw
In response to Patch for select and APC on win32  ("Magnus Hagander" <mha@sollentuna.net>)
List 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>

pgsql-patches by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: dollar quoting and pg_dump
Next
From: Neil Conway
Date:
Subject: Re: Fix for dumoing WITH/WITHOUT oids