fork not working?

Colin Steele <[email protected]> Sun, 09 Jan 2005 20:51:29 -0500
Newsgroups gmane.comp.apache.mod-ruby
Message-ID <[email protected]>
Hi, all.  I'm running the following mod_ruby script:


p Apache.server_version
p ENV["MOD_RUBY"]

`touch /tmp/foo`

p Process.fork do
  `touch /tmp/bar`
end

sleep 10
puts `ls -l /tmp/foo`
puts `ls -l /tmp/bar`
exit


Which produces the following output in my browser:

"Apache/2.0.51 (Fedora)"
"mod_ruby/1.2.4"
4474
-rw-r--r--  1 apache apache 0 Jan  9 20:44 /tmp/foo


So I'm left wondering, where'd my forked child with pid 4474 go?  What's it doing?  How come it didn't touch /tmp/bar?

Is this a bug or a feature?  I grepped around in the mod_ruby source and couldn't find anything obviously related to Process.fork... any help would be greatly appreciated.

--Colin Steele
[email protected]