Re: [HACKERS] Current Win32 port status

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: [HACKERS] Current Win32 port status
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE171586@algol.sollentuna.se
обсуждение исходный текст
Ответы Re: [HACKERS] Current Win32 port status
Список 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 по дате отправления:

Предыдущее
От: Claudio Natoli
Дата:
Сообщение: Re: Signals on Win32 (yet again)
Следующее
От: "Merlin Moncure"
Дата:
Сообщение: Re: Signals on Win32 (yet again)