Jump to content


Photo

pg_connect() and forking


  • Please log in to reply
1 reply to this topic

#1 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 23 March 2006 - 08:00 AM

I have a script which opens a connection with pg_connect(), and then forks some children. Unfortunately, when the first child exits, the database connection gets closed. The parent then gets a "server closed connection unexpectedly" warning on the next database query.

Is there some way to hide this connection from the child so it doesn't close it on exit?

I am using PHP 4.3.10 on Linux

#2 btherl

btherl
  • Staff Alumni
  • Advanced Member
  • 3,893 posts
  • LocationAustralia

Posted 27 March 2006 - 01:45 AM

I know this is a difficult question. I will bump this once only in the hope that someone has had to deal with php's forking behaviour before :)




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users