On Fri, Apr 22, 2005 at 03:39:55PM -0400, Tom Lane wrote: > Jakub =?ISO-8859-2?Q?Wo=BCny?= <[EMAIL PROTECTED]> 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/ ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])