Skip site navigation (1) Skip section navigation (2)

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

From: Douglas McNaught <doug(at)mcnaught(dot)org>
To: Dennis Jenkins <dennis(dot)jenkins(at)sbcglobal(dot)net>
Cc: postgresql listserv <pgsql-general(at)postgresql(dot)org>
Subject: Re: Function written in C, hangs on one machine and not another...
Date: 2005-10-28 15:59:03
Message-ID: m2sluliqew.fsf@Douglas-McNaughts-Powerbook.local (view raw or flat)
Thread:
Lists: pgsql-general
Dennis Jenkins <dennis(dot)jenkins(at)sbcglobal(dot)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

In response to

Responses

pgsql-general by date

Next:From: Martijn van OosterhoutDate: 2005-10-28 16:36:56
Subject: Re: Function written in C, hangs on one machine and not another...
Previous:From: Dennis JenkinsDate: 2005-10-28 15:18:23
Subject: Re: Function written in C, hangs on one machine and not another...

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group