On Fri, Apr 22, 2005 at 03:39:55PM -0400, Tom Lane wrote:
> Jakub Woźny <kubaw@o2.pl> writes:
> > I wrote a simple function:
>
> > signal(SIGCHLD,SIG_IGN);
> > switch(fork())
>
> This will NOT work. It WILL corrupt your database. You do not get to
> randomly introduce new processes into the backend set.
What about fork() followed by exec*(), either explicitly or via
popen(), system(), etc.? Should these be avoided as well, or is
there a safe way to do them? I'm thinking of the case where a
user-defined function wants to invoke some external command -- I've
done that in experiments but I've never been sure how safe it was.
--
Michael Fuhr
http://www.fuhr.org/~mfuhr/