`command` returns 256 in mod_ruby?

Spencer Cheng <[email protected]> Fri, 28 Sep 2007 17:41:12 -0400
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
I am wondering if anyone has seen this before?

I am writing an application which uses Ruby/mod_ruby/Apache2. When I  
run my index.rbx via the command line (ruby -T), everything works as  
expected. When I run the index.rbx via mod_ruby, the backquote  
expression returns 256(-1?) AFTER the first invocation of the command  
most of the time but sometimes returns 0 (and runs properly). I've  
gone through the source code of the command (se_term from the Sedna  
XML DBMS) and they do not return a -1 or 256.

If I restart Apache, the backquoted se_term command will work one or  
2 times and then start returning status 256 (and 0 bytes of output).  
This also happen when I use IO.popen().

Has anyone seen this before?

Regards,
Spencer

PS. Apache/2.2.3 (Ubuntu) mod_ruby/1.2.6 Ruby/1.8.6(2007-03-13)  
mod_apreq2-20051231/2.6.0