pipe = IO.popen("")
if pipe
STDERR.puts "In parent, child pid is #{pipe.pid}"
else
STDERR.puts "In child, pid is #{$$}"
end
This example shows how the process ID can be used. Process ID is part of 'Execution Environment Variables' (part of predifined variables).