Using connection after fork

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Using connection after fork
Date: 2004-08-10 08:41:40
Message-ID: 200408101041.40902.peter_e@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm looking at a database-using program (PostgreSQL/libpq and MySQL) which
does the following: A daemon process opens a database connection, forks
children on request, and those children access the database using that
inherited connection. After one request, the child dies. It seems to me
that this connection sharing cannot work because the processes would get
mixed up, but the author claims that he has tested this successfully. I've
been trying to figure out the semantics from the libc documentation, but I
can't find a definitive answer. Does anyone know what will happen in this
situation, and why it actually appears to work?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Raphael Bauduin 2004-08-10 09:14:03 hostory tables with a generic function?
Previous Message Peter Eisentraut 2004-08-10 08:36:32 Re: PostgreSQL 8.0 Feature List?