fork() and dynamically loaded c functions....

Поиск
Список
Период
Сортировка
От Jay Flattery
Тема fork() and dynamically loaded c functions....
Дата
Msg-id 722420.36413.qm@web120110.mail.ne1.yahoo.com
обсуждение исходный текст
Ответы Re: fork() and dynamically loaded c functions....  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Hi there,

I have some functions written in C that are dynamically loaded. I persist some
state between function calls, initialised by _PG_init. This works fine

I now fork() a process in _PG_Init() (both processes interact), but when I
shutdown postgre I get: LOG:  failed to find proc 0x1331110 in ProcArray
Basically the child process stays alive after postgre exists (as verified by ps
-A)

I was thinking that I could use  _PG_fini for the cleanup, but the manual says
that it "will only be called during an unload of the file, not during process
termination."

Is there any way to either a) insert some cleanup code when the server shuts
down; or b) instruct postgres to kill the child process?

Thanks!






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

Предыдущее
От: Jacqui Caren-home
Дата:
Сообщение: Re: MySQL versus Postgres
Следующее
От: Vibhor Kumar
Дата:
Сообщение: Re: pgtune