pgsql: Work around unfortunate getppid() behavior on BSD-ish systems.
В списке pgsql-committers по дате отправления:
| От | Robert Haas |
|---|---|
| Тема | pgsql: Work around unfortunate getppid() behavior on BSD-ish systems. |
| Дата | |
| Msg-id | E1PV0ZV-0001t5-CQ@gemulon.postgresql.org обсуждение |
| Список | pgsql-committers |
Work around unfortunate getppid() behavior on BSD-ish systems. On MacOS X, and apparently also on other BSD-derived systems, attaching a debugger causes getppid() to return the pid of the debugging process rather than the actual parent PID. As a result, debugging the autovacuum launcher, startup process, or WAL sender on such systems causes it to exit, because the previous coding of PostmasterIsAlive() detects postmaster death by testing whether getppid() == PostmasterPid. Work around that behavior by checking the return value of getppid() more carefully. If it's PostmasterPid, the postmaster must be alive; if it's 1, assume the postmaster is dead. If it's any other value, assume we've been debugged and fall through to the less-reliable kill() test. Review by Tom Lane. Branch ------ master Details ------- http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=24ecde7742cd4d7c781e6890b07571fff42b25dc Modified Files -------------- src/backend/storage/ipc/pmsignal.c | 34 +++++++++++++++++++++------------- 1 files changed, 21 insertions(+), 13 deletions(-)
В списке pgsql-committers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера