Re: Function written in C, hangs on one machine and not another...

Поиск
Список
Период
Сортировка
От Douglas McNaught
Тема Re: Function written in C, hangs on one machine and not another...
Дата
Msg-id m2sluliqew.fsf@Douglas-McNaughts-Powerbook.local
обсуждение исходный текст
Ответ на Re: Function written in C, hangs on one machine and not another...  (Dennis Jenkins <dennis.jenkins@sbcglobal.net>)
Ответы Re: Function written in C, hangs on one machine and not another...  (Martijn van Oosterhout <kleptog@svana.org>)
Список pgsql-general
Dennis Jenkins <dennis.jenkins@sbcglobal.net> writes:

> Is it safe for the postgres engine to fork()?  Would
> the child need to close down anything immediately in
> its main() to avoid corrupting the parent?

I *think* (Tom may correct me) that as long as you don't call into the
backend code at all in the child process, and don't write to any file
descriptors other than (properly set-up) stdin and stdout, you'd be
OK.  The safest thing to do would be to exec() a separate binary that
does the parsing, but that would incur an additional performace
penalty.

-Doug

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

Предыдущее
От: Dennis Jenkins
Дата:
Сообщение: Re: Function written in C, hangs on one machine and not another...
Следующее
От: Martijn van Oosterhout
Дата:
Сообщение: Re: Function written in C, hangs on one machine and not another...