From: Simon Strandgaard <0bz63fz3m1qt3001@...> Date: 2003-05-30T17:47:21+09:00 Subject: Re: output redirection within mod_ruby On Fri, 30 May 2003 18:32:13 +0900, Ian Macdonald wrote: > Unfortunately, the output of the binary called by system does not get > sent to the browser, even though the binary sends its output to stdout. > Presumably, mod_ruby is discarding the output. I had kind_of? same problem, so I made a wrapper for system/backquote. the code for 'system' is here: http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/metaeditor/experiments/cpp_embed_ruby/test/output/b.rb?rev=1.29&content-type=text/vnd.viewcvs-markup unittesting here.. some examples of how to use it. http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/metaeditor/experiments/cpp_embed_ruby/test/output/testall.rb?rev=1.15&content-type=text/vnd.viewcvs-markup You will need to overload 'system' + 'Kernel#system' + 'backquote' def my_own_system(cmd, *args) p cmd p args end # overload 'system' def system(cmd, *args) my_own_system(cmd, *args) end # overload 'backquote' def `(cmd) my_own_system(cmd) end system("hello", "42") `world` -- Simon Strandgaard