Ruby - Concurrent Programming
Identify the error in this Ruby code using
fork:
pid = fork do puts 'Child running' end puts 'Parent running' Process.wait
fork:
pid = fork do puts 'Child running' end puts 'Parent running' Process.wait
Process.wait method should be called with the child's PID to wait for that specific process.Process.wait is called without any argument, which waits for any child process but can cause unexpected behavior or errors if multiple children exist.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions