Re: [HACKERS] Current Win32 port status - Mailing list pgsql-hackers-win32

From Magnus Hagander
Subject Re: [HACKERS] Current Win32 port status
Date
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE171586@algol.sollentuna.se
Whole thread Raw
Responses Re: [HACKERS] Current Win32 port status
List pgsql-hackers-win32
> 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

pgsql-hackers-win32 by date:

Previous
From: Claudio Natoli
Date:
Subject: Re: Signals on Win32 (yet again)
Next
From: "Merlin Moncure"
Date:
Subject: Re: Signals on Win32 (yet again)