Re: Win32 question: getppid() with no parent?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Win32 question: getppid() with no parent?
Дата
Msg-id 10201.1085871483@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Win32 question: getppid() with no parent?  ("Magnus Hagander" <mha@sollentuna.net>)
Список pgsql-hackers-win32
"Magnus Hagander" <mha@sollentuna.net> writes:
>> But you'd do that only once during postmaster start, right?  It's
>> probably marginally faster/safer to do that than to fabricate a new
>> handle in each child based on PostmasterPid.

> Yup, then you could just write the HANDLE vlaue (basically a 32-bit
> integer) to the backend startup file

Great.  Could I get someone to implement this now?  The function that
needs it is PostmasterIsAlive() in src/backend/storage/ipc/pmsignal.c.
You can check whether it works by noting whether the stats processes
shut down when the postmaster goes away ...

> If you need the pgstat process to keep track of it's chlid (the other
> pgstat process), you'd need it once there too.

The pgstat processes (and everything else launched by the postmaster)
now use write/read_backend_variables, so copying the handle there should
be sufficient.

            regards, tom lane

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

Предыдущее
От: Harald Armin Massa
Дата:
Сообщение: Re: Loggin on WIN32
Следующее
От: Claudio Natoli
Дата:
Сообщение: Re: Win32 question: getppid() with no paren