Re: [HACKERS] Unportable implementation of background worker start

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: [HACKERS] Unportable implementation of background worker start
Дата
Msg-id 20170420233248.6ydiuowzk25lutft@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: [HACKERS] Unportable implementation of background worker start  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: [HACKERS] Unportable implementation of background worker start
Список pgsql-hackers
On 2017-04-20 19:23:28 -0400, Tom Lane wrote:
> or are the HANDLEs in a Windows WaitEventSet not inheritable
> resources?

I think we have control over that. According to
https://msdn.microsoft.com/en-us/library/windows/desktop/ms724466(v=vs.85).aspx
CreateProcess() has to be called with bInheritHandles = true (which we
do for backends), and SECURITY_ATTRIBUTES.bInheritHandle has to be true
too.  The latter we already only do for InitSharedLatch(), but not for
InitLatch(), nor for the WSACreateEvent's created for sockets - those
apparently can never be inherited.

So that kind of sounds like it should be doable.

- Andres



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Unportable implementation of background worker start
Следующее
От: Tom Lane
Дата:
Сообщение: Re: [HACKERS] Unportable implementation of background worker start