On May 08, 06 10:38:26 -0400, Jerry Feldman wrote:
It is tedious to do this, but you really need to track every open(2) and close(2). You also have a complicated system where you are using BOTH threads and forks. Be very careful of using fork(2) from threads. To quote from Dave Butenhof, "Avoid using forkin a threaded program (if you can) unless you intend to exec a new program immediately". Page 197 "Programming with POSIX Threads".
Why that? Yes, you have to be carefull about open file descriptors and
memory maps (and other IPC stuff), but it should work. Apache is
successfully using a mixture of threads and processes.
Matthias
--
Matthias Hopf