Using connection after fork
| От | Peter Eisentraut |
|---|---|
| Тема | Using connection after fork |
| Дата | |
| Msg-id | 200408101041.40902.peter_e@gmx.net обсуждение исходный текст |
| Ответы |
Re: Using connection after fork
Re: Using connection after fork |
| Список | 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?
В списке pgsql-general по дате отправления: