From apache-modules Tue Jan 13 17:25:57 2004 From: Christian Parpart Date: Tue, 13 Jan 2004 17:25:57 +0000 To: apache-modules Subject: Re: [apache-modules] Re: Thread Message-Id: <200401131826.05791.cparpart () surakware ! net> X-MARC-Message: https://marc.info/?l=apache-modules&m=107401477115902 -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 On Tuesday 13 January 2004 6:02 pm, Marco Spinetti wrote: > No, > > I'm starting threads in child process (inside handler function) not > during reading of configuration data. > > Reading your email it seems that using pthreads inside child process in > apache 1.3.x gives strange results and it will not work as expected, > while using apache 2 all is ok. > > Is it true? it is not (at all). I believe this, because I have developed a module that had to watch for I/O events on 2 sockets (web client and backend server). This was done in a backgroupd thread, so that I could do usual work in the main handler process. Unfortunately, my error log was flooding me with thouthends of segfault messages (very often requested module), and after having removed any thread connection in this module, my segfaults has been reduced to a very more acceptable minimum. > What is the right and real answer? The right thing I believe, is, if you'r coding an apache module, you should try to design it in a flat model, that is, without any threads. For listening for I/O events for example do a select/poll/epoll or even use (that still not yet understood how to use easily) apr_poll API by apache. best regards, Christian Parpart. - -- 18:10:33 up 7 days, 5:00, 2 users, load average: 0.29, 0.33, 0.34 -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (GNU/Linux) iD8DBQFABCoqPpa2GmDVhK0RAjfWAKCHxq6MaGl1LCVzfxj/QUUfjLzzqACfXdbJ h+rQKI+JKfTLbHPkIv5/S2M= =aRSI -----END PGP SIGNATURE----- --------------------------------------------------------------------- To unsubscribe, e-mail: apache-modules-unsubscribe@covalent.net For additional commands, e-mail: apache-modules-help@covalent.net