Re: [HACKERS] Current Win32 port status

From: "Magnus Hagander" <mha(at)sollentuna(dot)net>
To: "Claudio Natoli" <claudio(dot)natoli(at)memetrics(dot)com>, "Bruce Momjian" <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: <pgsql-hackers-win32(at)postgresql(dot)org>
Subject: Re: [HACKERS] Current Win32 port status
Date: 2003-12-22 14:45:23
Message-ID: 6BCB9D8A16AC4241919521715F4D8BCE171586@algol.sollentuna.se
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers pgsql-hackers-win32 pgsql-patches

> Bruce Momjian wrote:
> > > * a workable pipe replacement
> >
> > I don't have 'pipe' mentioned on the win32 patch. Can you
> > give details?
>
> Yeah you do. The second point under "Problems with select()".
>
> Basically, the Win32 call to pipe() returns a file descriptor
> which is invalid to pass on to Win32 select() (as it only
> takes socket handles).
>
> So, we need to replace the select'ing mechanism under Win32
> (yech), or write a Win32 pipe() replacement that returns two
> socket endpoints (good enough for our purposes), or something else...

I think you want to be investigating
WSAEventSelect() and then WaitForMultipleObjectsEx().

WSAEventSelect() claims it needs a WSAEVENT, but according to docs
otherwhere it should accept a standard event handle on NT+ platforms.

WaitForMultiple... will accept pipes, events, anything. (The Ex function
will also allow dispatching of user APCs, see related discussion about
signals)

//Magnus

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2003-12-22 14:45:32 Re: [GENERAL] Temporary tables and miscellaneous schemas
Previous Message Jeroen T. Vermeulen 2003-12-22 13:50:19 Re: COPY TABLE TO

Browse pgsql-hackers-win32 by date

  From Date Subject
Next Message Merlin Moncure 2003-12-22 15:19:13 Re: Signals on Win32 (yet again)
Previous Message Claudio Natoli 2003-12-22 13:03:11 Re: Current Win32 port status

Browse pgsql-patches by date

  From Date Subject
Next Message Tom Lane 2003-12-22 14:45:32 Re: [GENERAL] Temporary tables and miscellaneous schemas
Previous Message Andreas Pflug 2003-12-22 11:13:59 Re: pgAdmin crashes when client_min_messages is