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

Поиск
Список
Период
Сортировка
Искать
От
Jay Flattery
Тема
Re: fork() and dynamically loaded c functions....
Дата
Msg-id
228368.49208.qm@web120109.mail.ne1.yahoo.com
Ответ на
Список
Дерево обсуждения
fork() and dynamically loaded c functions.... Jay Flattery <jaycode@rocketmail.com>
Re: fork() and dynamically loaded c functions.... Tom Lane <tgl@sss.pgh.pa.us>
Re: fork() and dynamically loaded c functions.... Jay Flattery <jaycode@rocketmail.com>
Re: fork() and dynamically loaded c functions.... Tom Lane <tgl@sss.pgh.pa.us>
Re: fork() and dynamically loaded c functions.... Alvaro Herrera <alvherre@commandprompt.com>
Re: fork() and dynamically loaded c functions.... Tom Lane <tgl@sss.pgh.pa.us>
Re: fork() and dynamically loaded c functions.... Jay Flattery <jaycode@rocketmail.com>
Thanks for your reply


>> 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

>What exactly is that child process doing?  It sure sounds like it thinks
>it's a valid backend.

Actually it's not doing anything, as I'm just trying to work it all out - just a 

bunch of printfs and waits.
But the library is a PG_MAGIC_MODULE.

I tried killing it with pg_terminate_backend(pid) - but I get WARNING:   PID 
1166738497 is not a PostgreSQL server process. (Interestingly the  child 
pid=28629, which was printed in the line before)

>You can fork something if you like, but it had absolutely better not
>touch any part of shared memory afterwards.

Sure - it is intended to run independently.

Is there an internal pfork() or something similar I should use instead?



      

В списке pgsql-general по дате отправления
От: Eric Ridge
Дата:
От: Tom Lane
Дата:
FAQ