ENV["alpha"] = "123"
ENV["beta"] = "456"
fork do
x = ENV["alpha"]
ENV["beta"] = "789"
y = ENV["beta"]
puts " Child: alpha = #{x}"
puts " Child: beta = #{y}"
end
Process.wait
a = ENV["alpha"]
b = ENV["beta"]
puts "Parent: alpha = #{a}"
puts "Parent: beta = #{b}"