Re: FW: Win32 fix for miscinit.c

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: FW: Win32 fix for miscinit.c
Дата
Msg-id 6BCB9D8A16AC4241919521715F4D8BCE475E03@algol.sollentuna.se
обсуждение исходный текст
Ответ на FW: Win32 fix for miscinit.c  ("Dave Page" <dpage@vale-housing.co.uk>)
Список pgsql-patches
> >> Tom's recent patch to improve stale lockfile detection included a
> >> call to getppid() which doesn't exist on Windows.
> >> There is no clean way to implement one (previously discussed on
> >> hackers-win32) hence the attach patch simply #ifdefs out the call.
>
> Done.  I think this is no real problem for Windows, since its
> implementation of the kill(pid,0) check is not going to be
> fooled by parent processes anyway.

Correct. It will only catch an actual postgresql process.

Also, the logic was broken anyway since win32 assigns PIDs in a random
order and not sequential.. The probability you will get the same PID
after reboot is *very* low.

//mha

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: FW: Win32 fix for miscinit.c
Следующее
От: "Marc G. Fournier"
Дата:
Сообщение: Re: license cleanup