cr...@animalhead.com wrote:

I have a vague recollection of reading about the
circumstances in which filehandles can be inherited, but
can't remember where.

I've been bitten by this a few times. Filehandles (and thus sockets) are inherited across forks. If your system isn't very busy you won't notice a problem. But when things heat up you will start to get very strange problems. And I do mean strange.

I was doing something with Inline::Java (which communicates over a socket to a JVM) under mod_perl and the communication was getting all garbled. Multiple processes were sending and reading off the socket which confused the other processes since they were all getting partial reads on their data and partial reads from the data for other processes. But the problems only happened during the busiest 2 weeks of the year and were fine the rest of the time. But those weren't very fun weeks :)

--
Michael Peters
Plus Three, LP

Reply via email to