Re: bug in SignalSomeChildren

Поиск
Список
Период
Сортировка
От Martijn van Oosterhout
Тема Re: bug in SignalSomeChildren
Дата
Msg-id 20101220203637.GB13071@svana.org
обсуждение исходный текст
Ответ на Re: bug in SignalSomeChildren  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: bug in SignalSomeChildren  (Robert Haas <robertmhaas@gmail.com>)
Re: bug in SignalSomeChildren  (Eric Ridge <eebbrr@gmail.com>)
Список pgsql-hackers
On Mon, Dec 20, 2010 at 03:08:02PM -0500, Robert Haas wrote:
> The attached patch appears to work correctly on MacOS X.  I did check,
> BTW: getppid() in the attached process returns gdb's pid.  Poor!

This appears to be a BSDism at least. On Linux and BSD derivatives the
man pages specifically mention the reparenting (needed for catching
signals) but on Linux getppid() is specifically documented to return
the correct value anyway.

Frankly it's a wart, for example strace/truss/whatever could (since
it's tracing anyway) just fudge the correct value in the getppid() call
so the userspace process doesn't notice. This has been a bug since
forever though, so I wouldn't hold my breath.

Have a nice day,
--
Martijn van Oosterhout   <kleptog@svana.org>   http://svana.org/kleptog/
> Patriotism is when love of your own people comes first; nationalism,
> when hate for people other than your own comes first.
>                                       - Charles de Gaulle

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

Предыдущее
От: Kenneth Marshall
Дата:
Сообщение: Re: Extensions, patch v20 (bitrot fixes)
Следующее
От: Robert Haas
Дата:
Сообщение: Re: bug in SignalSomeChildren