From: Brian Candler Date: 2003-03-09T03:23:54+09:00 Subject: Re: DRB and threads On Sat, Mar 08, 2003 at 04:40:17PM +0000, ahoward wrote: > > > http://groups.google.com/groups?q=ahoward+mod_fcgi+group:comp.lang.ruby&hl=en&lr=&ie=UTF-8&selm=Pine.LNX.4.33.0302121430040.10747-100000%40eli.fsl.noaa.gov&rnum=1 > > > > Yes, I found this sufficiently interesting that I kept a copy when you first > > posted it, so thanks for reminding me! It's [ruby-talk:64468] for a shorter > > link. > > do you use the http://blade.nagaokaut.ac.jp/ruby/ruby-talk/index.shtml > interface to ruby-talk? i tried using that search facility to pull up my post > (searching for 'ahoward'), but didn't have any luck?? I do. The 'Namazu' search is broken; if it can't be fixed then IMO it would be much better if it were simply removed. Using 'subjects, regular expression' search and entering 'FCGI' finds your post though. > yeah, i knew about the supposed mod_fastcgi installed PIPE handler but figured > it couldn't hurt. let me know if find otherwise. regarding > libfcgi/os_unix.c, this is not used if you 'require fcgi.rb', which is an > option. remember the package ships with a ruby and c impl. 'require fcgi.rb' pulls in the C version if you have it, otherwise it loads the Ruby version. If there are going to be two versions then they really should be made as similiar in behaviour as possible of course. The only reason I haven't tested the Ruby version yet is that I've been too lazy to install stringio :-) > > * the trapping of TERM and HUP doesn't work properly for me. What happens is > > that if I send such a signal to the process, nothing happens (ps shows the > > same pid) until the next HTTP request comes along, at which point it fails > > and Apache returns '500 Internal Server Error'. The process is then > > restarted and it's fine thereafter. > > silly question but above you said > > > I removed install_traps and sent a kill -PIPE to the spawned process and it > > you did put it back in right? the described behaviour sound like you did not, > though i suspect you did... ;-( Yep, I tried both combinations. - with install_traps: I get the hanging behaviour as described above - with install_traps commented out: the process dies immediately on receipt of TERM or HUP as expected (although if it were in the middle of processing a request, it would bomb out without tidying up rather than finish the request) FYI I am currently working on adding FCGI server support to druby (there is already a HTTP client in samples/http0.rb). Will let you know if I get it to work! Regards, Brian.