If I do
Process.fork do
x
end
how can I know what x returned (e.g. true/fase/string) ?
(Writing to a file/database is not an
Thanks for all the answers, I got my solution up and running, still need to see how to handle non-forking environments, but for now it works :)
read, write = IO.pipe
Process.fork do
write.puts "test"
end
Process.fork do
write.puts 'test 2'
end
Process.wait
Process.wait
write.close
puts read.read
read.close
you can see it in action @ parallel_specs Rails plugin