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?