1 2 3 4 5 6 7 8
puts "parent process pid is #{Process.pid}" if fork puts "entered the if block from #{Process.pid}" else puts "entered the else block from #{Process.pid}" end